|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-03 19:11 UTC] et@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 00:00:02 2025 UTC |
Documentation states void ob_start ( [callback output_callback]) In reality since 4.3.2 this function returns a boolean value. It returns true if output buffering started successfully, and false if some problem occured. This problem can be output callback function that does not exist. Earlier versions of PHP started output buffering with default handler in this case. Code to show backward incompatibility: <? ob_start(); echo "AAA"; $a = ob_get_contents(); $var = ob_start("thereisnosuchfunction"); echo "BBB"; $b = ob_get_contents(); ob_end_clean(); ob_end_clean(); echo $b.'---'.$a; var_dump($var); ?> 4.3.2 outputs AAABBB---AAAbool(false) earlier versions output BBB---AAAbool(true)