ID: 31929
Updated by: [EMAIL PROTECTED]
Reported By: clover at fromru dot com
Status: Open
-Bug Type: Output Control
+Bug Type: Documentation problem
Operating System: WinXP, SuSe 9.2 (PHP:4.3...)
PHP Version: 5.0.3
New Comment:
That's docu problem.
var_export cannot be used in output buffering handlers and that should
clarified in the docs.
Previous Comments:
------------------------------------------------------------------------
[2005-02-11 07:56:34] clover at fromru dot com
Description:
------------
i'm using ob_start() with a callback function; internally in it i use
$res=var_export($var, TRUE) function but got an error:
[11-Feb-2005 08:28:15] PHP Fatal error: var_export() [<a
href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering
in output buffering display handlers in E:\htdocs\index.php on line XXX
Reproduce code:
---------------
<?php
ob_start("my_shutdown_function");
function my_shutdown_function($buffer){
$var=headers_list();
$res=var_export($var, TRUE);
return($res);
}
print("something...");
?>
Expected result:
----------------
the "dump" of all sent headers instead of string "something..."
Actual result:
--------------
"PHP Fatal error..."
Comment: this error actually must be when i call var_dump() or
var_export($var, FALSE) in output buffering handler.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31929&edit=1