Re: 4.1 & Declaration Case Persistance

From: Date: Fri, 04 May 2001 19:01:42 +0000
Subject: Re: 4.1 & Declaration Case Persistance
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-53924@lists.php.net to get a copy of this message
> The question was under what key the class entry should be stored... At any > rate, it's a non-issue; Saving the 'beautiful' version of the class name > is possible, but is a bit hacky IMHO. There should be an optional case > sensitive mode, and we'll introduce one in one of the future versions of PHP. Yeah ... I posted before reading the remainder of the thread. :) One "problem" with case sensitivity (perhaps) is that it may make some scripts non-portable. Say I develop a super-duper PEAR class using case-sensitive code (cause that's what I have on my server). Someone who is running PHP in case-insensitive mode will complain when my code says: if (get_class($foo)=='Some_Class_Name')) { ... So all code that might be shared either a) needs to only us lowercase names, b) coders need to implicity lowercase their comparisons by changing the above line to: if (strtolower(get_class($foo))=='some_class_name')) { ... or c) we also need a way to switch between sensitivity modes through PHP code (either an ini_set() call, or something else). Also, case-sensitivity means I can write code with functions like StrReplace() and MySQL_Fetch_Row(), which will seriously cause problems on non-case-sensitive installs ... unless all variations of PHP functions are reserved. - Colin

« previous php.dev (#53924) next »