3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { function __construct() { $this->name ="manzoor"; $this->age =28; } $foo = new foo(); echo $foo->name; echo {$foo->$name};
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$foo' (T_VARIABLE), expecting function (T_FUNCTION) in /in/6jYRT on line 11
Process exited with code 255.
Output for 5.3.7 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/6jYRT on line 11
Process exited with code 255.