1.2.631. List Short Syntax

Usage of short syntax version of list().

<?php

// PHP 7.1 short list syntax
// PHP 7.1 may also use key => value structures with list
[$a, $b, $c] = ['2', 3, '4'];

// PHP 7.0 list syntax
list($a, $b, $c) = ['2', 3, '4'];

?>

1.2.631.1. Specs

Short name

Php/ListShortSyntax

Rulesets

All, Appinfo, CE, Changed Behavior, CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70

Exakat since

0.8.4

PHP Version

With PHP 7.1 and more recent

Severity

Major

Time To Fix

Quick (30 mins)

Precision

High

Features

short-syntax

Available in

Entreprise Edition, Community Edition, Exakat Cloud