UPDATED
Is there any way to force case sensitive function names in PHP, even if it means re-compiling PHP?
- could this be achieved by some setting in the
php.ini
? - is it possible to achieve this by using some form of name-space "hack"?
- as a last resort: how (and where) do I edit the PHP
C
/C++
source-code that could force global case-sensitivity --and make it available as an option in thephp.ini
-which could be overridden by apache config, and.htaccess
, and during runtime withini_set()
?
There are plenty answers that confirm:
- PHP function-names and class-names are NOT case-sensitive
- PHP constants and variable names ARE case-sensitive
This question is about taking control of the situation as it is quite painful if you have the following problem:
<?
define('List', ':List:');
die(List);
?>
Parse error: syntax error, unexpected ')', expecting '('
In the example above, the "intrinsic" function-name list
interferes with the "user-defined" constant List
and not in a "good" way - as it results in a Parse Error.
I know many PHP developers do not care too much about "case-sensitivity" and do not see the need for this; however, if you're building a neat boiler-plate, or a framework with well defined data-types as short words (for comparison reasons), then it is a problem as you are targeting a large audience.
Any input would be appreciated, thanks.