Unconditional If Statements

If statements that are always evaluated should not be used.

Valid: An if statement that only executes conditionally.

if (<em>$test</em>) { $var = 1; }

Invalid: An if statement that is always performed.

if (<em>true</em>) { $var = 1; }

Valid: An if statement that only executes conditionally.

if (<em>$test</em>) { $var = 1; }

Invalid: An if statement that is never performed.

if (<em>false</em>) { $var = 1; }