Re: is_a, instanceof, conclusion

From: Date: Sat, 20 Aug 2005 08:54:38 +0000
Subject: Re: is_a, instanceof, conclusion
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-18233@lists.php.net to get a copy of this message
On Fri, 19 Aug 2005, Andi Gutmans wrote: > Dmitry commited the updated instanceof to HEAD. I suggest to merge it into > PHP_5_1 as many want it and it's an extremely low risk patch. > If people object, we can put it into 5.1.1. I saw he made instanceof NOT use autoload anymore. I'm not sure if that is such a good idea, as I'm wondering whether the following will work: file a.php: <?php interface A { } ?> file b.php: <?php class B implements A { } ?> index.php: <?php function __autoload($name) { require $name. '.php'; } $f = new b(); if ($f instanceof A) { $f->doInterfaceFoo(); } ?> regards, Derick

« previous php.internals (#18233) next »