3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Answer { public function answer() { return 4; } public function the() { return answer(); } public function get() { return this->the(); } } // end editing here $answer = new Answer; var_dump($answer->get()); ?>
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/hm2MT on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/hm2MT on line 18
Process exited with code 255.