|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-22 08:14 UTC] reinicke at sience dot de
Hi,
i have some code like this:
<?php
class getContentBlock {
}
$obj = new getContentBlock();
$classname = get_class($obj);
echo "Class of Object: $classname !";
?>
=> Class of Object: getcontentblock !
The value of $classname should "getContentBlock",
but i get "getcontentblock" !
This is incorrect and causes errors, Classnames are
case sensitiv.
Why is the return value in lower case ?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
Classnames aren't case sensitive; if you write: <?php class getContentBlock { } $obj = new GeTcOnTeNtBlOcK(); $classname = get_class($obj); echo "Class of Object: $classname !"; ?> It will work too. That's because the internal class representation is insenstive (thus stored only in lowercase). This may be subject of change in ZE2, susupending this report.