[PATCH] is_subclass_of(mixed, string)

From: Date: Sun, 24 Oct 2004 13:07:09 +0000
Subject: [PATCH] is_subclass_of(mixed, string)
Groups: php.internals 
Request: Send a blank email to internals+get-13489@lists.php.net to get a copy of this message
Hi, I have cooked a small patch which allows is_subclass_of() the accept not only an object as first parameter but a string as well. When string is passed the function checks whether the class specified is subclass of the second parameter class a{} class b{} extends a{} is_subclass_of("a", "a") //false is_subclass_of("b", "a") //true currently only objects are allowed as first parameter The patch can be seen here : http://www.hristov.com/andrey/projects/php_stuff/patches/is_subclass_of.patch.txt The phpt file is : http://www.hristov.com/andrey/projects/php_stuff/patches/is_subclass_of.phpt Thanks, Andrey

« previous php.internals (#13489) next »