One interesting thing I found out: You can concatenate variables and use spaces. Concatenating constants and function calls are also possible.
<?php
define('ONE', 1);
function one() {
return 1;
}
$one = 1;
${"foo$one"} = 'foo';
echo $foo1; ${'foo' . ONE} = 'bar';
echo $foo1; ${'foo' . one()} = 'baz';
echo $foo1; ?>
This syntax doesn't work for functions:
<?php
$foo = 'info';
{"php$foo"}(); $func = "php$foo";
$func();
?>
Note: Don't leave out the quotes on strings inside the curly braces, PHP won't handle that graciously.