3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyClass { function testing() { public $f = "hello world"; } } $obj = new MyClass; var_dump($obj); echo $ob->$testing(); ?>
Output for 5.4.0 - 5.4.9
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/ncWof on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.19
Parse error: syntax error, unexpected T_PUBLIC in /in/ncWof on line 6
Process exited with code 255.