3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); // assume ob_level is set to 1 $GLOBALS['test'] = false; // is used too check if output is called before test is set to true function output_check() { if($GLOBALS['test'] === true) return; // this is called before test is set to true, there's no return echo "This will be echoed before 'duck': "; die(); // this will end the execution after echoeing duck echo "This will not be echoed, yet 'duck' will be."; } header_register_callback("output_check"); ob_end_clean(); echo "duck"; $GLOBALS['test'] = true; echo " and ducklings";
Output for git.master, git.master_jit, rfc.property-hooks
This will be echoed before 'duck': duck

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:
180.97 ms | 405 KiB | 5 Q