On Tue, 09 Aug 2005 13:24:56 +0300 [EMAIL PROTECTED] (Pasha Zubkov) wrote: > Alan Knowles wrote: > > The basic point is that is_a() provided negative testing of > > non-existant classes > > if (!is_a($obj, "SomeRarelyUsedClass")) { .... > > > > instance_of does not, and can not, at present. > > You can use `if (!($obj instanceof SomeRarelyUsedClass))` ;) > > Why statement `$obj instanceof NotLoadedClass` can't evaluate as > FALSE if class not loaded (what with serialized objects?) because > if class not loaded, than object can't be instanceof this class, > right?
We do __not__ know that. This test tries to figure that out, exactly that. So no, it must not end to a fatal error. --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php