3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Class1 { public static function setup() { spl_autoload_register(array('Class1','_autoload')); } private static function _autoload() { } } class Class2 { public static function setup() { spl_autoload_register(array('Class2','_autoload')); } private static function _autoload() { } } Class1::setup(); Class2::setup(); print_r(spl_autoload_functions()); spl_autoload_unregister(array('Class1','_autoload')); print_r(spl_autoload_functions());
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => Class1 [1] => _autoload ) [1] => Array ( [0] => Class2 [1] => _autoload ) ) Fatal error: Uncaught TypeError: spl_autoload_unregister(): Argument #1 ($callback) must be a valid callback, cannot access private method Class1::_autoload() in /in/1EndQ:19 Stack trace: #0 /in/1EndQ(19): spl_autoload_unregister(Array) #1 {main} thrown in /in/1EndQ 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:
54.16 ms | 1630 KiB | 4 Q