|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-17 15:05 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Description: ------------ When the code reaches the callback function for ob_start, the objects in $GLOBALS have been destructed. In earlier versions of php they were not destructed at this point, making it possible to use $GLOBALS['object']->func() in output() This is new behaviour for 5.2 Reproduce code: --------------- <?php class dims { function x() { return "Muhahahaha"; } function __destruct() { echo "IM GOING DOWN!!!"; } } $GLOBALS['d'] = new dims(); function output($buffer) { var_dump($GLOBALS); return false; } ob_start('output'); ?> This is a test <hr> <?php var_dump($GLOBALS); ?> Expected result: ---------------- To have $GLOBALS['d'] still be there when reaching output() Actual result: -------------- $GLOBALS['d'] should still be available in output()