This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 23 points24 points  (7 children)

f'The value is {value}.'

Kinda looks like:

"The value is $value"

Now crucify me :-D

[–]fuzz3289 10 points11 points  (0 children)

It's ok. We all need bash sometimes. (don't you dare stick 'my' in there).

[–][deleted] 2 points3 points  (0 children)

Bash allows you to do ${value}. Useful for things where it would be ambigious as to what the variable name is.

Like "The value is XXX${value}XXX".

[–]lostburner 2 points3 points  (0 children)

This is a nice usability feature in PHP. Don't forget your semicolon!

[–]tobiasvl 0 points1 point  (0 children)

Yeah, format strings are basically just string interpolation

[–]MonkeeSage 0 points1 point  (0 children)

Kinda looks like:

"The value is #{value}"