3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Other\Hierarchy\TheOtherNamespace; $a = function(Some\Random\Namespace $b) { }; $b = function(TheOtherNamespace $c) { }; $handlers = [$a, $b]; foreach ($handlers as $handler) { $r = new ReflectionFunction($handler); $p = $r->getParameters(); var_dump($p[0]->getClass()); }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Method ReflectionParameter::getClass() is deprecated in /in/sJ5eH on line 19 Fatal error: Uncaught ReflectionException: Class "Some\Random\Namespace" does not exist in /in/sJ5eH:19 Stack trace: #0 /in/sJ5eH(19): ReflectionParameter->getClass() #1 {main} thrown in /in/sJ5eH on line 19
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:
33.81 ms | 401 KiB | 8 Q