3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class myparent { public function foo($bar) { // do stuff } } class mychild extends myparent { public $val; private function bar(myparent &$baz) { // do stuff } public function __construct($val) { $this->val = $val; } } $child = new mychild('hello world'); $child->foo('test'); $reflection = new reflectionClass('mychild'); print_r $reflection->getProperties();
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected '$reflection' (T_VARIABLE) in /in/tBLER on line 26
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/tBLER on line 26
Process exited with code 255.