3v4l.org

run code in 300+ PHP versions simultaneously
<?php class abc { private static $main; private function __construct() { } public function ob($b) { return $b.__FUNCTION__."\n"; } public function __destruct() { echo __FUNCTION__, "\n"; } public static function enable() { echo __FUNCTION__, "\n"; self::$main = new self; register_shutdown_function(__CLASS__.'::shutdown'); } public static function shutdown() { echo __FUNCTION__, "\n"; register_shutdown_function(__CLASS__.'::tail'); } public static function tail() { echo __FUNCTION__, "\n"; ob_start(array(self::$main, 'ob')); } } abc::enable();
Output for git.master, git.master_jit, rfc.property-hooks
enable shutdown tail __destruct ob

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