3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Name\Space; class Foo { public static function bar() { } } $reflection = new \ReflectionMethod('Name\\Space\\Foo', 'bar'); $closure = $reflection->getClosure(null); $reflection2 = new \ReflectionFunction($closure); echo PHP_EOL; echo PHP_EOL; $ReflectionClass = get_class($reflection); $ReflectionCeption = new \ReflectionClass($ReflectionClass); foreach ($ReflectionCeption->getMethods(\ReflectionMethod::IS_PUBLIC) as $Method) { if(!$Method->isStatic() && $Method->getNumberOfParameters() === 0) { echo sprintf('%s::%s(): ', $ReflectionClass, $Method->name); var_dump($Method->invoke($Reflection)); echo PHP_EOL; } }
Output for git.master, git.master_jit, rfc.property-hooks
ReflectionMethod::__toString(): Warning: Undefined variable $Reflection in /in/q7ZkD on line 24 Fatal error: Uncaught ReflectionException: Trying to invoke non static method ReflectionMethod::__toString() without an object in /in/q7ZkD:24 Stack trace: #0 /in/q7ZkD(24): ReflectionMethod->invoke(NULL) #1 {main} thrown in /in/q7ZkD on line 24
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:
55.19 ms | 401 KiB | 8 Q