Re: ReflectionClass::getMethod()

From: Date: Fri, 24 Dec 2004 14:40:15 +0000
Subject: Re: ReflectionClass::getMethod()
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-14204@lists.php.net to get a copy of this message
Christian Schneider wrote: > I assume that Sebastian would use something along the lines of You assume wrong. My point is that you should not use getMethod() when you do not know whether or not the method exists. If you do not know whether or not the method exists use getMethods() in PHP 5.0 or hasMethod() in PHP 5.1 to check. Calling getMethod() for a method that does not exist is an error and should be consistently treated as such by raising an exception. This has nothing to do with correct use or abuse of exceptions. Merry Christmas, Sebastian -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

« previous php.internals (#14204) next »