parser/tests/fixtures/0282-dynamic-variable/code.php
Saif Eddin Gmati 6a6d4d0e5f
chore: refactor ident and dynamic var parsers (#192)
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-10 15:24:55 +01:00

25 lines
300 B
PHP

<?php
function foo($a) {
global ${new class() {
public function __toString() {
return 'p';
}
}};
echo $p;
}
$p = 'why!';
$m = 'foo';
class f {
public static function foo() {
return foo([]);
}
}
f::${(function() {
return 'm';
})()}();