PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed

Recommend this page to a friend!
  Classes of milenmk   Simple PHP Password Manager   vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Arrays/ArrayBracketSpacingUnitTest.inc.fixed
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP Password Manager
Application to store and retrieve user password
Author: By
Last change:
Date: 1 year ago
Size: 712 bytes
 

Contents

Class file image Download
<?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;