Bug #68990 [Opn->Csd]: php notices doesn't not buffered in command line

From: Date: Fri, 06 Feb 2015 05:27:08 +0000
Subject: Bug #68990 [Opn->Csd]: php notices doesn't not buffered in command line
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190483@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68990&edit=1

 ID:                 68990
 User updated by:    kartechgc at gmail dot com
 Reported by:        kartechgc at gmail dot com
 Summary:            php notices doesn't not buffered in command line
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Output Control
 Operating System:   ubuntu
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Invalid


Previous Comments:
------------------------------------------------------------------------
[2015-02-05 12:32:38] kartechgc at gmail dot com

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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68990&edit=1


Thread (2 messages)

« previous php.bugs (#190483) next »