PHP5 - instanceof

From: Date: Thu, 13 May 2004 04:22:47 +0000
Subject: PHP5 - instanceof
Groups: php.general 
Request: Send a blank email to php-general+get-186071@lists.php.net to get a copy of this message
I have been playing with PHP5 and am liking it more and more. But I have one question about "instanceof" If you have something like this: <? class A { } class B extends A { } $x = new B; if ($x instanceof B) echo "B"; if ($x instanceof A) echo "A"; ?> This would echo "BA". That's good, I understand that. Now the question: Is it possible to determine if B is an instance of A without instantiating it? Thanks Martin

« previous php.general (#186071) next »