Edit report at http://bugs.php.net/bug.php?id=12568&edit=1

 ID:                 12568
 Updated by:         [email protected]
 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

Reply via email to