Interviews3 answers
In PHP, what is the difference between self and $this. ?
3 Answers
$this-> and self also use in class but Use self we can call member static function.
Anant SinghPosted Apr 11, 2019, 2:46 AM EDT
http://www.programmerinterview.com/index.php/php-questions/php-self-vs-this/
Munesh SharmaPosted May 30, 2016, 10:22 PM EDT
we can say that $this is used to reference the current object, whereas self is used to access the current class itself.
saurabh singhPosted Mar 18, 2015, 2:11 AM EDT


