Bug #17882 Updated: case sensitivity of functions in classes

From: Date: Thu, 20 Jun 2002 18:06:42 +0000
Subject: Bug #17882 Updated: case sensitivity of functions in classes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11594@lists.php.net to get a copy of this message
ID: 17882 Updated by: sander@php.net Reported By: erickoh@chopchopsolutions.com -Status: Bogus +Status: Open Bug Type: Class/Object related Operating System: Linux PHP Version: 4.1.2 New Comment: Hm, you're right. This is a bug. Confirmed with 4.3.0-dev. Previous Comments: ------------------------------------------------------------------------ [2002-06-20 14:02:50] erickoh@chopchopsolutions.com Hi, I understand that PHP functions are not case sensitive. Declaring such 2 functions outside a class gives: Fatal error: Cannot redeclare a() in /var/www/html/a.php on line 6 However declaring the same 2 functions in a class produces no errors. This led me to believe that class methods are case-sensitive. I think it will be nice if an error can be thrown during the interpretation phase, else a note about this should be put in under the section 'PHP Classes' ------------------------------------------------------------------------ [2002-06-20 13:47:17] sander@php.net Functions names are not case sensitive and I'm sure that's noted somewhere in the manual. ------------------------------------------------------------------------ [2002-06-20 13:38:20] erickoh@chopchopsolutions.com /* Result of code below is 'AA' instead of 'aA' If this is normal behavior, I think a note about this should be made in the documentation. */ <?php class X { function a() { echo 'a'; } function A() { echo 'A'; } } X::a(); X::A(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17882&edit=1

« previous php.bugs (#11594) next »