1.2.1102. Short Syntax For Arrays¶
Arrays written with the new short syntax.
PHP 5.4 introduced the new short syntax, with square brackets. The previous syntax, based on the array() keyword is still available.
<?php
// All PHP versions array
$a = array(1, 2, 3);
// PHP 5.4+ arrays
$a = [1, 2, 3];
?>
See also Array.
1.2.1102.1. Connex PHP features¶
1.2.1102.1.1. Specs¶
Short name |
Arrays/ArrayNSUsage |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
With PHP 5.3 and more recent |
Severity |
Critical |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |