I want to echo the value of a property using magic quotes.
$obj = new stdClass;
$obj->foo = 123;
echo "foo: ${obj->foo}";
This fails with the following error message:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /foobar/test.php on line 3
I know I could write something like this:
echo "foo: ".$obj->foo;
But shouldn't the curly brackets work in this case too?