Hi Ralk 2012/2/21 Ralf Lang <l...@b1-systems.de>: > Am 21.02.2012 16:55, schrieb Martin Amps: > of course there is always a way to script around issues rather than > adressing them. I just want to know if the change would be desired. I have > code around which does exactly this, check on all levels of all possible > combinations. Semantically, this is nonsense and it bloats the code. It's > just a requirement because currently PHP handles this as non-recoverable > fatal. > > I see no reason why it would be not desirable to have PHP raise the > exception rather than putting more or less repeating code snippets all > around the place. That is why I am asking.
This topic have been raised many many times (Turning errors into Exceptions). What it seems like you are trying to shave off, is 3 lines, I do know that it is sample code but like Martin replied, you should implement such yourself as PHP does not do any magical overloading without explicitly declared, witch I think is a good decision. TL;DR, in basic terms, if you want it as a one-liner, you must implement the overloading methods yourself to obtain that chaning you are after. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php