3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace deleon { class franz { protected function __construct(array $hello) { var_dump($hello); } } } var_dump(get_class_methods('deleon\franz'));die; $reflection = new ReflectionClass('deleon\franz'); $reflection->newInstanceArgs(array(array("hello franz")));
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.21
Fatal error: No code may exist outside of namespace {} in /in/FO7mm on line 13
Process exited with code 255.

preferences:
179.48 ms | 1395 KiB | 57 Q