From: ceo at l-i-e dot com Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: ob_start chunk_size 0 and 1 are special?
Description: ------------ User-contributed notes and my own limited experience indicates that 0 and 1 are "special" to the chunk_size in ob_start() and make the callback not behave as documented. Can this be documented? Or was it a bug that got fixed? Reproduce code: --------------- <?php //abuses ob_start callback in CLI to 'tee' output //to both buffer and stderr function tee($string){ error_log($string); return false; } ob_start('tee', 0); //fails ob_start('tee', 1); //fails ob_start('tee', 2); //works! ?> Expected result: ---------------- 0, 1, and 2 should behave the same, or be documented as special. -- Edit bug report at http://bugs.php.net/?id=39120&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39120&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39120&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39120&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39120&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39120&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39120&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39120&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39120&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39120&r=support Expected behavior: http://bugs.php.net/fix.php?id=39120&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39120&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39120&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39120&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39120&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39120&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39120&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39120&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39120&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39120&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39120&r=mysqlcfg