1.2.114. Case Insensitive Constants¶
PHP constants used to be able to be case insensitive, when defined with define() and the third argument.
This feature is deprecated since PHP 7.3 and is removed since PHP 8.0.
<?php
// case sensitive
define('A', 1);
// case insensitive
define('B', 1, true);
echo A;
// This is not possible
//echo a;
// both possible
echo B;
echo b;
?>
See also define.
1.2.114.1. Specs¶
Short name |
Constants/CaseInsensitiveConstants |
Rulesets |
|
Exakat since |
1.3.9 |
PHP Version |
With PHP 8.0 and older |
Severity |
Critical |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Features |
dynamic-constant, constant |
Available in |