php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15675 get_class() returns only lower chars
Submitted: 2002-02-22 08:14 UTC Modified: 2003-04-25 11:56 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: reinicke at sience dot de Assigned:
Status: Wont fix Package: Class/Object related
PHP Version: 4.1.1 OS: linux & w2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: reinicke at sience dot de
New email:
PHP Version: OS:

 

 [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 ?

 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-22 08:33 UTC] mfischer@php.net
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.
 [2003-04-25 11:56 UTC] sniper@php.net
This won't change.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 04:01:30 2024 UTC