Hi!
Personally, I really don't care for something like this. Would it be
caught by a __call declaration if one existed (since it is a call to
an undefined method)? Would you expect it to?
No and no. __call is not called for ctors, for obvious reasons (__call
is an object method, and before ctor is done the object is not ready).
It was always this way.
I'd rather see calls to non-existent methods generate a catachable
fatal error (rather than a hard fatal error that's currently thrown).
Personally, I like this "catchable fatal error" business less and less.
It's an awkward way of doing an exception with all exception downsides
and none of the upsides...
But silently ignoring a called function, something just doesn't sit
right about that...
We're already doing it :) Try:
class Foo {}
$a = new Foo();
You just ignored a non-existing ctor.
--
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