3v4l.org

run code in 300+ PHP versions simultaneously
<?php first::init(); second::init(); print_r(spl_autoload_functions()); new Foo; class first { public static function init() { spl_autoload_register(array('self','load')); } public static function load($class) { echo "first is loading class $class\n"; } } class second { public static function init() { spl_autoload_register(array('self','load')); } public static function load($class){ echo "second is loading class $class\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Use of "self" in callables is deprecated in /in/aMkoi on line 10 Deprecated: Use of "self" in callables is deprecated in /in/aMkoi on line 20 Array ( [0] => Array ( [0] => first [1] => load ) [1] => Array ( [0] => second [1] => load ) ) first is loading class Foo second is loading class Foo Fatal error: Uncaught Error: Class "Foo" not found in /in/aMkoi:6 Stack trace: #0 {main} thrown in /in/aMkoi on line 6
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:
50.25 ms | 401 KiB | 8 Q