Re: [PHP-DEV] Interpolation using ${} syntax with spaces inside the braces

2016-04-15 Thread Rowan Collins
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

Re: [PHP-DEV] Interpolation using ${} syntax with spaces inside the braces

2016-04-14 Thread Simon Welsh
> 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

Re: [PHP-DEV] Interpolation using ${} syntax with spaces inside the braces

2016-04-14 Thread Sara Golemon
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

Re: [PHP-DEV] Interpolation using ${} syntax with spaces inside the braces

2016-04-14 Thread Davey Shafik
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]