3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function &__get($name) { $name[0] = 'y'; var_dump(func_get_args()); } } (new Foo())->xxx;
based on 4bM1Y
Output for 7.0.0 - 7.2.0
array(1) { [0]=> string(3) "yxx" } Notice: Only variable references should be returned by reference in /in/XiYoO on line 9
Output for 5.4.12 - 5.6.21
array(1) { [0]=> string(3) "xxx" } Notice: Only variable references should be returned by reference in /in/XiYoO on line 9
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/XiYoO on line 13
Process exited with code 255.