PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
Squiz
/
Tests
/
Arrays
<?php $myArray['key'] = $value; $myArray[/* key start */'key'] = $value; $myArray[/* key start */'key'/* key end */] = $value; $myArray [ 'key' ] = $value; if ($array[($index + 1)] === true) { } else if ($array [ ($index + 1) ] === null) { } $array = [ 'foo' => 'bar', 'bar' => 'foo', ]; if ($foo) {} [$a, $b] = $c; echo foo()[ 1 ]; echo $this->addedCustomFunctions['nonce']; echo $this->deprecated_functions[ $function_name ]['version']; echo [ 1,2,3 ][0]; echo [ 1,2,3 ][ 0 ]; echo 'PHP'[ 0 ]; $array = []; $var = $var[$var[$var]]]; // Syntax error $var = $var[$var[$var]; // Syntax error $myArray[ /* key start */'key'] = $value; $myArray[ /* key start */'key'/* key end */ ] = $value;
[-] ArrayBracketSpacingUnitTest.php
[edit]
[+]
..
[-] ArrayDeclarationUnitTest.php
[edit]
[-] ArrayDeclarationUnitTest.4.inc
[edit]
[-] ArrayDeclarationUnitTest.1.inc
[edit]
[-] ArrayDeclarationUnitTest.4.inc.fixed
[edit]
[-] ArrayDeclarationUnitTest.3.inc
[edit]
[-] ArrayDeclarationUnitTest.1.inc.fixed
[edit]
[-] ArrayBracketSpacingUnitTest.inc.fixed
[edit]
[-] ArrayDeclarationUnitTest.2.inc.fixed
[edit]
[-] ArrayDeclarationUnitTest.2.inc
[edit]
[-] ArrayBracketSpacingUnitTest.inc
[edit]