hi Lukas,

On Mon, Aug 24, 2009 at 11:51 PM, Lukas Kahwe Smith<m...@pooteeweet.org> wrote:
>
> On 24.08.2009, at 23:42, Stanislav Malyshev wrote:
>
>> Hi!
>>
>>> 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.
>
>
> 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.

To call a function to avoid a noisy or resource expensive error is just as bad.

There are many common operations in PHP where we over react (file ops
for example). As I agree with Rasmus' comments, I do think that this
patch is the wrong fix for the real problem (that does not mean I do
not like to have it in). I would however prefer to have APIs without
any kind of noisy errors, at least for the common operations or where
the error is obviously expected (as IO can fail). Please note that I
did not suggest to use exceptions everywhere.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to