parijat_php Posted June 24, 2009 Share Posted June 24, 2009 Hi, I have noticed php5 makes extensive use of the $this keyword. I have a very vague idea why? Can anyone please illustrate this, also I know how it is used in the context of Java, but find it difficult to make sense out of it in PHP. If anyone can give me an explanation or point to a page with a great explanation, that would be great! Link to comment https://forums.phpfreaks.com/topic/163442-this-in-php/ Share on other sites More sharing options...
J.Daniels Posted June 24, 2009 Share Posted June 24, 2009 $this is a reference to the calling object in OOP. http://us.php.net/manual/en/language.oop5.basic.php Link to comment https://forums.phpfreaks.com/topic/163442-this-in-php/#findComment-862365 Share on other sites More sharing options...
.josh Posted June 24, 2009 Share Posted June 24, 2009 if you understand the concept in java then you should have no problem understanding the concept in php. Link to comment https://forums.phpfreaks.com/topic/163442-this-in-php/#findComment-862370 Share on other sites More sharing options...
MadTechie Posted June 24, 2009 Share Posted June 24, 2009 echo $CV, $this refers to this object! Link to comment https://forums.phpfreaks.com/topic/163442-this-in-php/#findComment-862378 Share on other sites More sharing options...
Ken2k7 Posted June 24, 2009 Share Posted June 24, 2009 MadTechie, semi-colon. Link to comment https://forums.phpfreaks.com/topic/163442-this-in-php/#findComment-862453 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.