3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace CParent { class Helper{} class Test{ /** * @var Helper */ public $helper; public function __construnct() { $this->helper = new Helper(); } } } namespace Child { class Helper{} class Test extends \CParent\Test {} } $qwe = new Child\Test(); var_dump($qwe->helper);
Output for 5.3.0 - 5.4.29
Fatal error: No code may exist outside of namespace {} in /in/n2pV6 on line 27
Process exited with code 255.