Foreach Loop Declarations

There should be a space between each element of a foreach loop and the as keyword should be lowercase.

Valid: Correct spacing used.

foreach (<em></em>$foo<em> </em>as<em> </em>$bar<em> </em>=><em> </em>$baz<em></em>) { echo $baz; }

Invalid: Invalid spacing used.

foreach (<em> </em>$foo<em> </em>as<em> </em>$bar<em></em>=><em></em>$baz<em> </em>) { echo $baz; }

Valid: Lowercase as keyword.

foreach ($foo <em>as</em> $bar => $baz) { echo $baz; }

Invalid: Uppercase as keyword.

foreach ($foo <em>AS</em> $bar => $baz) { echo $baz; }