|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-02-06 05:27 UTC] kartechgc at gmail dot com
-Status: Open
+Status: Closed
[2015-02-06 05:27 UTC] kartechgc at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 21:00:02 2025 UTC |
Description: ------------ <?php ob_start(); echo "Hello world"; echo $a; ob_end_clean(); ?> Output: PHP Notice: Undefined variable: a in /home/karthik/scripts/a1.php on line 4 PHP Stack trace: PHP 1. {main}() /home/karthik/scripts/a1.php:0 Here, even notice shouldn't have been there in the output. Does notices bypass this buffer? If the same script is run through browser, the output is empty as expected. Test script: --------------- <?php ob_start(); echo "Hello world"; echo $a; ob_end_clean(); ?> Expected result: ---------------- The output should be empty. Actual result: -------------- PHP Notice: Undefined variable: a in /home/karthik/scripts/a1.php on line 4 PHP Stack trace: PHP 1. {main}() /home/karthik/scripts/a1.php:0