Re: [patch] error masks
| From: | Lukas Kahwe Smith | Date: | Mon, 24 Aug 2009 22:11:47 +0000 |
| Subject: | Re: [patch] error masks | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45366@lists.php.net to get a copy of this message | ||
On 24.08.2009, at 23:59, Rasmus Lerdorf wrote:
Lukas Kahwe Smith wrote:right .. what i was trying to say was that i can see value in being able to hide E_DEPRECATED and E_STRICT, but the error stuff shouldnt be hidden that way. users should either display or log their E_NOTICES and fix them! regards, Lukas Kahwe Smith mls@pooteeweet.orgOn 24.08.2009, at 23:42, Stanislav Malyshev wrote:Lukas, the problem is that all messages, E_STRICT, E_DEPRECATED, E_NOTICE, whatever, all cause a performance hit even if the error_reporting level is such that they will never show up anywhere. That's what this patch is trying to address. To write optimal code, they have to be entirely clean of all messages including E_DEPRECATED and E_STRICT.Hi!well a few of those places would probably be fixable, by providing functions to check beforehand if calling the final function would cause an error. but that if course would add more overhead, but would still be the "cleaner" solution. overall i am not so convinced about the ignoring approach. as for E_STRICT .. that shouldnt become less of an issue now that we have E_DEPRECATED .. but i guess that just means that in the future people will complain about E_DEPRECATED .. anyways to me both E_STRICT and E_DEPRECATED are development tools that can be totally ignored in production. however E_NOTICE should not occur in production and we shouldnt encourage people to make them disappear entirely.Quite boring to read this thread where two persons argue about something abstract. Stas, can you give a real life example where your patch is necessary..?Any code where you either use @ or error_reporting which is not -1 would benefit from it by not processing errors that go nowhere. I just looked at Zend Framework - with is pretty clean with regard to E_NOTICE/E_STRICT problems - and @ is used in dozens of classes around. The speedup would be probably not very big for whole RL application, but it's a 10-line patch, and little things help too.