The following code snippet is valid PHP, but XHPAST cannot parse it. Specifically, the following error is raised: XHPAST Parse Error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 8.
<?php $user = array( 'id' => 123, 'name' => 'Joe Bloggs', ); echo "'{$user["name"]}'";
The issue here is that double quotes are nested within an expression that is nested within double quotes. The following modification to the source will parse correctly:
-echo "'{$user["name"]}'"; +echo "'{$user['name']}";