1.2.321. Custom Constant Usage¶
The code is using constants that are not defined in PHP extensions or PHP itself. This may lead to a fatal error.
<?php
// display MY_CONSTANT : MY_CONSTANT is a user constant.
echo MY_CONSTANT;
// display PHP version : PHP_VERSION is a native PHP constant.
echo PHP_VERSION;
// MY_CONSTANT definition.
const MY_CONSTANT;
?>
See also PHP Constants.
1.2.321.1. Connex PHP features¶
1.2.321.1.1. Specs¶
Short name |
Constants/CustomConstantUsage |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |