1<documentation title="Static This Usage">
2    <standard>
3    <![CDATA[
4    Static methods should not use $this.
5    ]]>
6    </standard>
7    <code_comparison>
8        <code title="Valid: Using self:: to access static variables.">
9        <![CDATA[
10class Foo
11{
12    <em>static</em> function bar()
13    {
14        return <em>self</em>::$staticMember;
15    }
16}
17]]>
18        </code>
19        <code title="Invalid: Using $this-> to access static variables.">
20        <![CDATA[
21class Foo
22{
23    <em>static</em> function bar()
24    {
25    return <em>$this</em>->$staticMember;
26    }
27}
28]]>
29        </code>
30    </code_comparison>
31</documentation>
32