note 73865 added to function.ob-start
| From: | denis at SPAM_WELCOME dot i39 dot ru | Date: | Tue, 13 Mar 2007 14:55:32 +0000 |
| Subject: | note 73865 added to function.ob-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124411@lists.php.net to get a copy of this message | ||
This function's behaviour has been changed in php 5.2.0:
<?
global $AP;
$AP = new ap;
ob_start("ob_end");
function ob_end() {
global $AP;
$r = $AP->test();
return $r;
}
class ap {
function test() {
return "debug";
}
}
?>
In older versions it shows: "debug".
But latest php version causes error: PHP Fatal error: Call to a member function test() on a
non-object.
And this is not a bug: http://bugs.php.net/bug.php?id=40104
----
Server IP: 195.222.164.18
Probable Submitter: 83.219.130.40
----
Manual Page -- http://www.php.net/manual/en/function.ob-start.php
Edit -- https://master.php.net/note/edit/73865
Del: integrated -- https://master.php.net/note/delete/73865/integrated
Del: useless -- https://master.php.net/note/delete/73865/useless
Del: bad code -- https://master.php.net/note/delete/73865/bad+code
Del: spam -- https://master.php.net/note/delete/73865/spam
Del: non-english -- https://master.php.net/note/delete/73865/non-english
Del: in docs -- https://master.php.net/note/delete/73865/in+docs
Del: other reasons-- https://master.php.net/note/delete/73865
Reject -- https://master.php.net/note/reject/73865
Search -- https://master.php.net/manage/user-notes.php