Edit report at https://bugs.php.net/bug.php?id=61272&edit=1
ID: 61272
Updated by: mike@php.net
Reported by: peacech at gmail dot com
Summary: ob_start callback get passed empty string
-Status: Open
+Status: Not a bug
Type: Bug
Package: Output Control
Operating System: Arch 32 bit
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You should append $output to $buffer.
Previous Comments:
------------------------------------------------------------------------
[2012-03-04 10:53:53] peacech at gmail dot com
Description:
------------
Running test script below with PHP 5.4 outputs
""
Running test script below with PHP 5.3 outputs
"hello"
Test script:
---------------
<?php
$buffer = -1;
function callback($output)
{
global $buffer;
$buffer = $output;
return $output;
}
ob_start('callback');
echo 'hello';
ob_get_clean();
var_dump($buffer);
Expected result:
----------------
"hello"
Actual result:
--------------
""
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61272&edit=1