note 73865 deleted from function.ob-start by cmb
| From: | cmb@php.net | Date: | Sun, 14 Jul 2019 11:27:49 +0000 |
| Subject: | note 73865 deleted from function.ob-start by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211576@lists.php.net to get a copy of this message | ||
Note Submitter: denis at SPAM_WELCOME dot i39 dot ru
----
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