3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $foo = 123; protected static function bar() { echo static::class, ' value of foo is: ', self::$foo, PHP_EOL; } } class B extends A { public static function bar() { $closure = (new ReflectionMethod('A', 'bar'))->getClosure(null)->bindTo(null, B::class); $closure(); } } B::bar();
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Cannot rebind scope of closure created from method in /in/k4A2d on line 12 Fatal error: Uncaught Error: Value of type null is not callable in /in/k4A2d:13 Stack trace: #0 /in/k4A2d(17): B::bar() #1 {main} thrown in /in/k4A2d on line 13
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:
93.37 ms | 401 KiB | 8 Q