<?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";
You have javascript disabled. You will not be able to edit any code.