ID:               25205
 Comment by:       reiersol at online dot no
 Reported By:      thomas dot hebinck at digionline dot de
 Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux Debian Woody
 PHP Version:      5CVS-2003-08-22 (dev)
 New Comment:

If this is not a bug, how can I actually autoload a class in practice?
PHP 5 has removed the case information. If I don't have the case
information available, Linux can't find the file--unless, that is, I
make all my file names lowercase. Have I misunderstood?


Previous Comments:
------------------------------------------------------------------------

[2003-08-22 03:35:31] [EMAIL PROTECTED]

Not bug.


------------------------------------------------------------------------

[2003-08-22 03:23:37] thomas dot hebinck at digionline dot de

Description:
------------
Class names are case insensitiv. __autoload always get lower-case class
name.

I think, this is not very important - but unusual ;-)

Reproduce code:
---------------
File 'case_insensitiv_class.php':

<?php
class CASE_insensitiv_CLASS {
  function __construct() {
    echo '__construct of ' . __CLASS__ . '<br>';
  }
}
?> 

File 'case_insensitiv_main.php':

<?php
function __autoload($className) {
  echo '__autoload of ' . $className . '<br>';
  require_once $className . '.php';
}
$test = new cAsE_InsEnsItIv_clAss;
?>


Expected result:
----------------
__autoload of cAsE_InsEnsItIv_clAss

and then some error ;-)

Actual result:
--------------
__autoload of case_insensitiv_class
__construct of case_insensitiv_class


------------------------------------------------------------------------


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

Reply via email to