|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-07 02:13 UTC] vrana@php.net
[2006-03-07 02:13 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 23:00:01 2025 UTC |
Description: ------------ It needs to be documented that print_r and var_export, with the second parameter TRUE, internally use output buffering to return their result rather than output it. This causes them to fail when used within an output buffering callback handler. Alternatively, this could be changed to a feature request and the code could be changed to not use output buffering. Reproduce code: --------------- <?php function ob_handler( $in ) { return var_export( $in, true ); } ob_start( 'ob_handler' ); echo "Hello"; ?> Expected result: ---------------- 'Hello' Actual result: -------------- Fatal error: var_export(): Cannot use output buffering in output buffering display handlers in Command line code on line 2