3v4l.org

run code in 300+ PHP versions simultaneously
<?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.18 - 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.4.0 - 5.4.17
Parse error: syntax error, unexpected '$reflection' (T_VARIABLE) in /in/PN6SS 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/PN6SS on line 26
Process exited with code 255.

preferences:
174.38 ms | 1399 KiB | 55 Q