Simon Welsh wrote on 15/04/2016 00:52:
When not inside a string, the inside of the ${...} is always treated as an
expression, by both PHP and HHVM (https://3v4l.org/i2kOP), so that looks like
the
“correct” handling for inside a string.
The in-quotes behaviour makes sense when you consider the
> On 15/04/2016, at 9:40 AM, Sara Golemon wrote:
>
> On Thu, Apr 14, 2016 at 3:37 AM, Davey Shafik wrote:
>> Whitespace inside of { } should not matter, the contents should be evaluated
>> as an expression and it's results used to determine the variable name, so
>> ${great} should also be $my as
On Thu, Apr 14, 2016 at 3:37 AM, Davey Shafik wrote:
> Whitespace inside of { } should not matter, the contents should be evaluated
> as an expression and it's results used to determine the variable name, so
> ${great} should also be $my as in the other cases.
>
Right. Which is why I'm conflicted
Whitespace inside of { } should not matter, the contents should be
evaluated as an expression and it's results used to determine the variable
name, so ${great} should also be $my as in the other cases.
Is this related to the use of quotes around string array keys inside
strings?
e.g. "$foo[great]