Force case sensitive functions in PHP :: by recompiling the source?

UPDATED
Is there a way to force case-sensitive function names into PHP, even if it means recompiling PHP?

  • can this be done with some setting in php.ini?
  • Can this be achieved using some form of “hack” namespace?
  • as a last resort: how (and where) can I fix the PHP C/ source code C++, which could force global case sensitivity - and make it available as an option in php.ini, which can be overridden by the apache configuration and .htaccess, and at runtime with ini_set()?

There are many answers confirming:

  • PHP function names and class names are not case sensitive
  • PHP constants and variable names. Case sensitive

This question is about controlling the situation, as it is rather painful if you have the following problem:

<?
    define('List', ':List:');
    die(List);
?>

Parse error : syntax error, unexpected ')', pending '('

In the above example, the "internal" function name listinterferes with the "user-defined" constant list, and not with the "good" way, as this leads to an analysis error.

, PHP " " ; , ( ), , .

, .

+4
1

, , ; , - .

PHP, . :

php ?


, :

  • PHP : http://php.net/downloads.php
  • "" , sensitiv case_ ; , , : ./Zend/zendAPI.c ()
  • CONST_CS , ./Zend/zend_constants.h,
  • , , + PHP ( Linux : /etc/php

php.ini

  • ./Zend/zend_ini.c
  • , , , ./Zend/zend_ini_scanner.*.

Apache .htaccess



PHP, .


, . , "PHP-", , , , /.


, , ; , , , , , :

  • : List, ListDT ( List-Data)
  • , , : isList()

: " " , " ".

PHP, " " PHP , "" .

+1

All Articles