Hi!

What I mean is that you can catch recoverable fatal error in your error
handler and at least be notified of what happened. Yes, you cannot go back
in your script to corrent anything after that but you can show a detailed
error message and send error email to developer.

Just the same thing you can do when you hint class name for your input
parameter - it will generate catchable fatal error if object is not an
instance of expected class.

Exactly, strict typing has same flaws everywhere, and this is exactly the reason it's not a solution for the problem it is presented to be - it does not make your code more robust or fail less or saves you effort on development - it just produces different error messages. While the case of wrong object type is rare enough to warrant application failure in case it happens - the case for scalar types is completely different. It was discussed many times on the list.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to