Say I have the following PHP script:
<?
register_shutdo wn_function('te st');
ob_start();
echo "part2";
function test()
{
$output = ob_get_contents ();
ob_end_clean();
echo "part1<br />".$output;
}
?>
The output of this is part2part1<br />. Why isn't it part1<br />part2?
register_shutdo wn_function should make the test function be the last
thing that's called, just as it is in the following, shouldn't it?:
<?
ob_start();
echo "part2";
test();
function test()
{
$output = ob_get_contents ();
ob_end_clean();
echo "part1<br />".$output;
}
?>
<?
register_shutdo wn_function('te st');
ob_start();
echo "part2";
function test()
{
$output = ob_get_contents ();
ob_end_clean();
echo "part1<br />".$output;
}
?>
The output of this is part2part1<br />. Why isn't it part1<br />part2?
register_shutdo wn_function should make the test function be the last
thing that's called, just as it is in the following, shouldn't it?:
<?
ob_start();
echo "part2";
test();
function test()
{
$output = ob_get_contents ();
ob_end_clean();
echo "part1<br />".$output;
}
?>
Comment