Req #12568 [Opn->Csd]: Feature Request for function is_subclass_of
| From: | jani@php.net | Date: | Tue, 14 Dec 2010 11:09:21 +0000 |
| Subject: | Req #12568 [Opn->Csd]: Feature Request for function is_subclass_of | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156987@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=12568&edit=1
ID: 12568
Updated by: jani@php.net
Reported by: php at nichtich dot de
Summary: Feature Request for function is_subclass_of
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: Class/Object related
Operating System: Linux
PHP Version: 4.0.6
-Assigned To:
+Assigned To: jani
Block user comment: N
Private report: N
New Comment:
Implemented in PHP 5.0.3 it seems.
Previous Comments:
------------------------------------------------------------------------
[2001-08-04 17:58:11] php at nichtich dot de
unfortunately the function is_subclass_of does not accept class names in
both arguments like get_parent_class since 4.0.5. it would be nice if
you could use is_subclass_of in the following way:
is_subclass_of($foo,"bar")
true if $foo is an object of a subclass of bar
(this is how it works now)
is_subclass_of("foo","bar")
true if foo is a subclass of bar
(a wrote a function to do this, see my note on is_subclass_of)
is_subclass_of("foo",$bar)
true if foo is a subclass of the class $bar
= is_subclass_of("foo",get_class($bar));
is_subclass_of($foo,$bar)
true if $foo is an object of the class of $bar
thanx a lot!
Jakob
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=12568&edit=1