PHP 5.4 new output control API callback buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm just wondering, what is the right output of below code should be

ob_start(function($o) { fwrite(STDERR, $o); });
echo 'hello';
ob_end_clean();

Does it should print "hello" or does it should print nothing?

In PHP 5.3, it prints hello, but in 5.4.0 it prints nothing.

Looking at the C code of PHP 5.4, it explicitly discards the output
buffer before calling the callback, except when flushing
or when using the internal callback handler.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux