1.2.1046. Reserved Keywords In PHP 7¶
PHP reserved names for class/trait/interface. They won’t be available anymore in user space starting with PHP 7.
For example, string, float, false, true, null, resource,`… <https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list>`_ are not acceptable as class name.
<?php
// This doesn't compile in PHP 7.0 and more recent
class null { }
?>
See also List of other reserved words.
1.2.1046.1. Connex PHP features¶
1.2.1046.1.1. Suggestions¶
Avoid using PHP reserved keywords as names for structures such as class, functions, etc.
1.2.1046.1.2. Specs¶
Short name |
Php/ReservedKeywords7 |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
With PHP 7.0 and older |
Severity |
Major |
Time To Fix |
Slow (1 hour) |
Changed Behavior |
PHP 7.0 |
Precision |
Very high |
Available in |