Fredrik Holmström wrote:

> Why do you want this? To allow for "true" duck typing (which I think
> fits good into PHP's dynamic nature) without having the risk of your
> application running into fatal errors and now having to use

There are way more profane use cases like nicely handling such errors to
display some nice end user messages, handle logging events etc. It may
be possible to recover from more (all?) fatal errors.

> a) Change the error raised when running into an unknown method call
> into it's own type that is fatal if not caught by an user defined
> error handler?

That would IMHO be the best way. It would even be better if all uncaught
exceptions would at least raise an E_NOTICE or even E_WARNING.

> b) Change the error raised to E_WARNING
>
> c) Change the error raised to E_RECOVERABLE_ERROR which as far as I
> can make out is possible to handle with a user defined error handler?

These are not the way to go in my eyes.

> d) Make the engine throw an exception of a special type when an
> unknown method is called, possibly provide an php.ini-setting so you
> can toggle between the old (E_ERROR) and the new
> (UnkownMethodException) to not break BC?

The second best and worst option. Please not another ini-Setting.

- Sebastian

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

Reply via email to