Andi Gutmans wrote:
> Sebastian, throwing an exception is relatively slow and cumbersome and
> sucks if you want to do something like a Delegation model and run
> through objects and check if a method can be called. Having exceptions
> thrown each time the object doesn't have the method is crazy.
On Fri, 24 Dec 2004, Sebastian Bergmann wrote:
> Andi Gutmans wrote:
> > Sebastian, throwing an exception is relatively slow and cumbersome and
> > sucks if you want to do something like a Delegation model and run
> > through objects and check if a method can be called. Having exceptions
> > throw
Derick Rethans wrote:
> THAT is crazy.
Throwing away consistency is crazy, too.
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
--
PHP Internals - PHP Runtime Development Mailing List
To uns
Derick Rethans wrote:
I think it doesn't make sense if there is no method to actually check if
it's there. Now you start throwing exeptions without having a way to
avoid it. THAT is crazy.
I assume that Sebastian would use something along the lines of
try
{
$reflectionClass->getMethod("foo"
Hello Derick,
in 5.0 the solution is to use getMethods() and look for it. Since that is
not the best to do and not what we really want to i'll commit johannes'
patch for hasMethod() later today.
marcus
Friday, December 24, 2004, 1:00:44 PM, you wrote:
> On Fri, 24 Dec 2004, Sebastian Bergmann
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
Sebastian Bergmann wrote:
You assume wrong. My point is that you should not use getMethod() when
you do not know whether or not the method exists.
Ok, let's look at the options then:
5.0 - getMethods() [sure, you could probably use clever tricks to make
this shorter but the general clumsiness wi
I've been working with Edin to try and track down what caused the
sudden round of crashes in the COM extension in the latest 4.3
release, and it seems that the PZVAL_UNLOCK that Stas introduced in
this commit:
http://viewcvs.php.net/viewcvs.cgi/Zend/Attic/zend_execute.c.diff?r1=1.316.2.41&r2=1.316
> $word = new COM('Word.Application');
> $word->Documents->Open('somedoc.doc');
Just to clarify. The first method invocation will work. During that call
$word object gets destroyed. If we were to add another method invocation
($word->Quit() for example) php would crash.
Edin
--
PHP Internals -
Why not just returning null when a method does not exist?
Actually CALLING a non-existing method should be treated as an error...
On Fri, 24 Dec 2004 18:47:26 +0100, Christian Schneider
<[EMAIL PROTECTED]> wrote:
> Sebastian Bergmann wrote:
> > You assume wrong. My point is that you should not u
10 matches
Mail list logo