On Mon, Dec 31, 2007 at 12:28:23PM +0100, Fredrik Holmström wrote: > Hi! > > I've never posted on internal before, but I've been a long time reader > of it. I've been using PHP for a long time, I think it all started > back in 2000 sometime, anyway - this is hardly a place to put my > entire php biography up for show, so I'll jump right to the action. > > Ever since PHP5 and the much improved object model (exceptions, and > what not) there has been one thing missing (at least for me) the whole > time. When you call a method (and function, but this doesn't really > matter from an OO perspective) on an object that does not exist, you > get a "Fatal error: Call to undefined method Foo::bar() in > C:\www\index.php on line 4". > > What I would like to argue/request is that there should be a way to > get an exception thrown when you call a non existent method on an > object, since it's not possible to catch E_ERROR with a user defined > function using set_error_handler() I can't see anyway to accomplish > this in the current implementation?
What is wrong with __call() ? See: http://www.php.net/manual/en/language.oop5.overloading.php -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php