Workaround for older PHP-Versions:
function is_a($anObject, $aClass) {
return get_class($anObject) == strtolower($aClass)
or is_subclass_of($anObject, $aClass);
}
![]() | is_a![]()
martin dunisch
14-Feb-2006 04:02
Workaround for older PHP-Versions:
dead dot screamer at seznam dot cz
07-Feb-2006 03:44
Why I test if class `A` inherit class `B` or implements interface `C` before I create class `A`?
zabmilenko at hotmail dot com
08-Oct-2005 08:20
In the below example, the object and class name need to be reversed. Sorry.
zabmilenko at hotmail dot com
08-Oct-2005 08:18
Lazy Instantiation using is_a() and php5
cesoid at yahoo dot com
06-Oct-2005 10:01
is_a returns TRUE for instances of children of the class.
aidan at php dot net
21-May-2004 10:11
This functionality is now implemented in the PEAR package PHP_Compat. | ![]() |