note 86051 modified in function.is-subclass-of by felipe
| From: | felipe@php.net | Date: | Wed, 01 Oct 2008 19:05:39 +0000 |
| Subject: | note 86051 modified in function.is-subclass-of by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144948@lists.php.net to get a copy of this message | ||
It would appear that is_subclass_of is case insensitive unlike get_class in php5.
i.e.
<?php
class fooBar {}
class bar extends fooBar {}
assert(get_class(new fooBar()) == "fooBar");
assert(is_subclass_of(new bar(), "foobar") == true);
?>
i run across this while migrating some code from php4 to php5 and the code would only half-the-time
break.
--was--
It would appear that is_subclass_of is case insensitive unlike get_class in php5.
i.e.
class fooBar {}
class bar extends fooBar {}
assert(get_class(new fooBar()) == "fooBar")
assert(is_subclass_of(new bar(), "foobar") == true)
i run across this while migrating some code from php4 to php5 and the code would only half-the-time
break.
http://php.net/manual/en/function.is-subclass-of.php