Skip to content

Instantly share code, notes, and snippets.

@westonruter
Created December 14, 2014 03:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westonruter/9b0a450b99039fe40d17 to your computer and use it in GitHub Desktop.
Save westonruter/9b0a450b99039fe40d17 to your computer and use it in GitHub Desktop.
$ phpcs --standard=WordPress-Core test.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
5 | WARNING | Array keys should be surrounded by spaces unless they contain a
| | string or an integer.
6 | WARNING | Array keys should NOT be surrounded by spaces if they only
| | contain a string or an integer.
--------------------------------------------------------------------------------
Time: 13ms; Memory: 2.5Mb
<?php
$arr = array( 1, 2, 3 );
$i = 0;
$x = $arr[$i];
$y = $arr[ 1 ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment