class error Using $this when not in object context
<p>I have the following class and its not accepting $this keyword in the method.
can someone guid</p>

<pre><code>&lt;?php
class test {

    function __construct($x, $y, $z){

        $this-&gt;$x = $x;


        $this-&gt;testFunction();





public static function testFunction(){



    print '&lt;br&gt; here it is:'.$this-&gt;$x.'--&lt;br&gt;';
}



//========================================================================================================================
}
?&gt;
</code></pre>

<p>it gives me this error  </p>

<pre><code> Fatal error: Using $this when not in object context 
</code></pre>
