1<documentation title="Unconditional If Statements">
2    <standard>
3    <![CDATA[
4    If statements that are always evaluated should not be used.
5    ]]>
6    </standard>
7    <code_comparison>
8        <code title="Valid: An if statement that only executes conditionally.">
9        <![CDATA[
10if (<em>$test</em>) {
11    $var = 1;
12}
13        ]]>
14        </code>
15        <code title="Invalid: An if statement that is always performed.">
16        <![CDATA[
17if (<em>true</em>) {
18    $var = 1;
19}
20        ]]>
21        </code>
22    </code_comparison>
23    <code_comparison>
24        <code title="Valid: An if statement that only executes conditionally.">
25        <![CDATA[
26if (<em>$test</em>) {
27    $var = 1;
28}
29        ]]>
30        </code>
31        <code title="Invalid: An if statement that is never performed.">
32        <![CDATA[
33if (<em>false</em>) {
34    $var = 1;
35}
36        ]]>
37        </code>
38    </code_comparison>
39</documentation>
40