3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP ABSTRACT CLASS Base { protected static $stub = ['baz']; //final public function boot() static public function boot() { print __METHOD__.'-> '.get_called_class().PHP_EOL; array_walk(static::$stub, function() { print __METHOD__.'-> '.get_called_class().PHP_EOL; }); } public function __construct() { self::boot(); print __METHOD__.'-> '.get_called_class().PHP_EOL; array_walk(static::$stub, function() { print __METHOD__.'-> '.get_called_class().PHP_EOL; }); } } CLASS Sub EXTENDS Base { } new sub; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Base::boot-> Sub {closure}-> Sub Base::__construct-> Sub {closure}-> Sub

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:
51.32 ms | 401 KiB | 8 Q