PHP Classes

File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml

Recommend this page to a friend!
  Classes of Simo   CodeIgniter Plugin for Z-Ray   zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml   Download  
File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/Generic/Docs/CodeAnalysis/ForLoopShouldBeWhileLoopStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CodeIgniter Plugin for Z-Ray
Show CodeIgniter application information in Z-Ray
Author: By
Last change:
Date: 2 years ago
Size: 654 bytes
 

Contents

Class file image Download
<documentation title="Condition-Only For Loops"> <standard> <![CDATA[ For loops that have only a second expression (the condition) should be converted to while loops. ]]> </standard> <code_comparison> <code title="Valid: A for loop is used with all three expressions."> <![CDATA[ for (<em>$i = 0</em>; $i < 10; <em>$i++</em>) { echo "{$i}\n"; } ]]> </code> <code title="Invalid: A for loop is used without a first or third expression."> <![CDATA[ for (<em></em>;$test;<em></em>) { $test = doSomething(); } ]]> </code> </code_comparison> </documentation>