Interpolation using ${} syntax with spaces inside the braces

From: Date: Wed, 13 Apr 2016 03:08:06 +0000
Subject: Interpolation using ${} syntax with spaces inside the braces
Groups: php.internals 
Request: Send a blank email to internals+get-92239@lists.php.net to get a copy of this message
I'm trying to decide just whether or not https://bugs.php.net/bug.php?id=71927 is "working as intended" as well as what the expected behavior in this situation /should/ be. https://3v4l.org/HfU1g indicates that at the very least HHVM and PHP disagree on the correct output, and testing the same sort of expression in bash says that it's not having any of it; "invalid substitution" warnings abound. The PHP behavior is just kinda weird. "${ great}" does constant interpolation yielding "$my" which in turn becomes variable interpolation and we find up with "my value". I'm actually doubtful that PHP pulls off this juggling *by accident*, which is why I'm posting about it before even going to the extent of proposing an RFC. Does anyone have historical context on this and can explain the current behavior as "working as intended"? -Sara

« previous php.internals (#92239) next »