3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function ($class) { class Foo{ public function __construct() { echo 'Foo'; } }; class_alias('Foo', 'Bar'); class_alias('Foo', 'Bar'); var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)); }, true, true); $bar = new Foo(); $bar2 = new Bar();
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Cannot declare class Bar, because the name is already in use in /in/v8bKo on line 11 array(1) { [0]=> array(3) { ["file"]=> string(9) "/in/v8bKo" ["line"]=> int(15) ["function"]=> string(9) "{closure}" } } FooFoo

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:
40.07 ms | 402 KiB | 8 Q