[PATCH] is_subclass_of(mixed, string)

php.internals

Andrey Hristov

21 years ago
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

Andi Gutmans

21 years ago
This patch looks fine to me. Any objections before I commit it? Andi At 03:07 PM 10/24/2004 +0200, Andrey Hristov wrote:

Andrey Hristov

21 years ago
Seems that noone complains :) Andrey Andi Gutmans wrote:

Andi Gutmans

21 years ago
Applied. Can you please update PHP 5.0 NEWS? Thanks, Andi At 03:07 PM 10/24/2004 +0200, Andrey Hristov wrote: