3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __construct($foo, $bar, $foo) {} } $r = new ReflectionClass('Foo'); var_export($r->__toString());
Output for 5.1.2 - 5.1.6, 5.3.6 - 5.6.28
'Class [ <user> class Foo ] { @@ /in/I41vo 3-7 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user, ctor> public method __construct ] { @@ /in/I41vo 5 - 5 - Parameters [3] { Parameter #0 [ <required> $foo ] Parameter #1 [ <required> $bar ] Parameter #2 [ <required> $foo ] } } } } '
Output for 5.2.0 - 5.3.5
'Class [ <user> class Foo ] { @@ /in/I41vo 3-7 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user, ctor> public method __construct ] { @@ /in/I41vo 5 - 5 - Parameters [3] { Parameter #0 [ <required> $foo ] Parameter #1 [ <required> $bar ] Parameter #2 [ <required> $ ] } } } } '
Output for 5.0.3 - 5.1.1
'Class [ <user> class Foo ] { @@ /in/I41vo 3-7 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user> <ctor> public method __construct ] { @@ /in/I41vo 5 - 5 - Parameters [3] { Parameter #0 [ <required> $foo ] Parameter #1 [ <required> $bar ] Parameter #2 [ <required> $foo ] } } } } '
Output for 5.0.0 - 5.0.2
'Class [ <user> class Foo ] { @@ /in/I41vo 3-7 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user> <ctor> public method __construct ] { @@ /in/I41vo 5 - 5 - Parameters [3] { Parameter #0 [ $foo ] Parameter #1 [ $bar ] Parameter #2 [ $foo ] } } } } '
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/I41vo on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/I41vo on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/I41vo on line 5
Process exited with code 255.