3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace xxx { class Coo { } class Boo extends Coo { } class Foo extends Boo { public function __construct(stdClass $hello) { } } } $r = new ReflectionClass('xxx\Foo'); $c = $r->getParentClass(); var_dump($c);
Output for 5.3.0 - 5.4.21
Fatal error: No code may exist outside of namespace {} in /in/P5m2S on line 22
Process exited with code 255.