3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace CParent { class Helper{} class Test{ /** * @var Helper */ $helper; public function __construnct() { $this->helper = new Helper(); } } } namespace Child { class Helper{} class Test extends \CParent\Test {} }
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$helper' (T_VARIABLE), expecting function (T_FUNCTION) in /in/iKIoH on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/iKIoH on line 11
Process exited with code 255.

preferences:
180.58 ms | 1386 KiB | 66 Q