Re: Detect zval instance of class/subclass

From: Date: Wed, 22 Sep 2010 20:10:04 +0000
Subject: Re: Detect zval instance of class/subclass
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7677@lists.php.net to get a copy of this message
On 22/09/10 19:35, Mark Skilbeck wrote:
Hi, all. I was wondering - supposing a function takes a parameter that can be either TypeA or TypeB, or any subclass thereof, what is the best way to check for this requirement? Initially I was just comparing the names in the class entry, but, of course, that won't work for subclassed objects.
After a little looking, I found the instanceof_function, which appears to do the trick. -- Mark Skilbeck mahcuz.com | gtk.php.net | pecl.php.net/cairo | docs.php.net

« previous php.pecl.dev (#7677) next »