3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump((string) new ReflectionMethod('ReflectionClass', '__clone')); var_dump((string) new ReflectionMethod('ReflectionFunction', '__clone')); var_dump((string) new ReflectionMethod('ReflectionMethod', '__clone')); var_dump((string) new ReflectionMethod('ReflectionParameter', '__clone')); var_dump((string) new ReflectionMethod('ReflectionExtension', '__clone'));
Output for 5.3.2 - 5.6.21, 7.0.0 - 7.1.0
string(92) "Method [ <internal:Reflection> final private method __clone ] { - Parameters [0] { } } " string(129) "Method [ <internal:Reflection, inherits ReflectionFunctionAbstract> final private method __clone ] { - Parameters [0] { } } " string(129) "Method [ <internal:Reflection, inherits ReflectionFunctionAbstract> final private method __clone ] { - Parameters [0] { } } " string(92) "Method [ <internal:Reflection> final private method __clone ] { - Parameters [0] { } } " string(92) "Method [ <internal:Reflection> final private method __clone ] { - Parameters [0] { } } "
Output for hhvm-3.10.0 - 3.12.0
string(54) "Method [ <internal> final public method __clone ] { } " string(91) "Method [ <internal, inherits ReflectionFunctionAbstract> final public method __clone ] { } " string(91) "Method [ <internal, inherits ReflectionFunctionAbstract> final public method __clone ] { } " string(54) "Method [ <internal> final public method __clone ] { } " string(54) "Method [ <internal> final public method __clone ] { } "
Output for 5.2.3 - 5.3.1
string(66) "Method [ <internal:Reflection> final private method __clone ] { } " string(103) "Method [ <internal:Reflection, inherits ReflectionFunctionAbstract> final private method __clone ] { } " string(103) "Method [ <internal:Reflection, inherits ReflectionFunctionAbstract> final private method __clone ] { } " string(66) "Method [ <internal:Reflection> final private method __clone ] { } " string(66) "Method [ <internal:Reflection> final private method __clone ] { } "
Output for 5.2.0 - 5.2.2
string(55) "Method [ <internal> final private method __clone ] { } " string(92) "Method [ <internal, inherits ReflectionFunctionAbstract> final private method __clone ] { } " string(92) "Method [ <internal, inherits ReflectionFunctionAbstract> final private method __clone ] { } " string(55) "Method [ <internal> final private method __clone ] { } " string(55) "Method [ <internal> final private method __clone ] { } "
Output for 5.0.0 - 5.1.6
string(12) "Object id #1" string(12) "Object id #1" string(12) "Object id #1" string(12) "Object id #1" string(12) "Object id #1"
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/ah7om on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionmethod in /in/ah7om on line 3