Re: WARNING: get_class() is case-sensitive in PHP 5
| From: | Greg Beaver | Date: | Thu, 15 Jan 2004 04:47:30 +0000 |
| Subject: | Re: WARNING: get_class() is case-sensitive in PHP 5 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25072@lists.php.net to get a copy of this message | ||
Hi,
This will still result in a fatal error:
<?php
class my {}
class My {}
?>
so only functions that return a string and are traditionally tested using == as in if (get_class($blah) == 'classname') will be affected
Greg
Paul M Jones wrote:
On Jan 14, 2004, at 4:47 PM, Stefan Neufeind wrote:On 14 Jan 2004 at 17:30, Greg Beaver wrote:This would affect functions, would it not? For example ...Any package that uses get_class() to check on the type of object (this includes PEAR) is broken in HEAD of PHP 5, simply because all PEAR classes have upper-case in them. All calls to get_class() must be wrapped in strtolower() to work in both php 4 and php 5.get_parent_class is_a is_subclass_of... or am I off base here?