3v4l.org

run code in 300+ PHP versions simultaneously
<?php function create_reflection($function){ if (is_array($function)) { return new \ReflectionMethod($function[0], $function[1]); } if (is_object($function) && !$function instanceof \Closure) { return new \ReflectionMethod($function, '__invoke'); } return new \ReflectionFunction($function);} $r = create_reflection(['Exception']); var_dump(get_class($r));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 1 in /in/YVPqu on line 3 Fatal error: Uncaught ReflectionException: ReflectionMethod::__construct(): Argument #1 ($objectOrMethod) must be a valid method name in /in/YVPqu:3 Stack trace: #0 /in/YVPqu(3): ReflectionMethod->__construct('Exception', NULL) #1 /in/YVPqu(5): create_reflection(Array) #2 {main} thrown in /in/YVPqu on line 3
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.53 ms | 401 KiB | 8 Q