değilken nesne bağlamında $ bu kullanma sınıf hata

0 Cevap

I have the following class and its not accepting $this keyword in the method. can someone guid

<?php
class test {

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

        $this->$x = $x;


        $this->testFunction();





public static function testFunction(){



    print '<br> here it is:'.$this->$x.'--<br>';
}



//========================================================================================================================
}
?>

bana bu hatayı veriyor

 Fatal error: Using $this when not in object context 

0 Cevap