Re: when $a = &new class is necessary
| From: | Christian Schmidt | Date: | Mon, 24 Sep 2007 19:48:17 +0000 |
| Subject: | Re: when $a = &new class is necessary | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48171@lists.php.net to get a copy of this message | ||
Sascha Grossenbacher wrote:
But your example does not change anything. Somewhere in the code, directly or within PEAR::makeNew, the "=& new" has to be there.. It can be "hidden" using eval(). Something similar happens in PEAR_Error, though that part of the code is deprecated. But I agree that it's not pretty.
I understand PHP5 friendliness different than you, for me it means that the code should act the same way on php4 and php5, which means, the & needs to be used. I agree that the code should work the same on PHP4 and PHP5. I am not suggesting otherwise. I only suggest dropping the "&" where it is not necessary.
To solve your op-code cache problem, I would suggest you to disable display_errors/error_reporting, it does not affect your custom error_handler in any way. Great idea! Disabling display_errors sounds like a feasible solution to the problem. My own error handler can just ignore that setting.Christian