Finwyn Posted January 15, 2007 Share Posted January 15, 2007 I have been doing some work with classes and I keep coming across examples on the web with have words like 'public' in front of the function.[code]public function displayVar() { echo $this->var; }[/code]I can't find anything on the web telling about it. I have also seen other words in front of functions and I would like to know what they do. Can any one help?Thanx Link to comment https://forums.phpfreaks.com/topic/34186-whats-in-front-of-functions-in-classes/ Share on other sites More sharing options...
trq Posted January 15, 2007 Share Posted January 15, 2007 They are the method visiblity declerations available in php5. read[url=http://www.php.net/manual/en/language.oop5.visibility.php]here[/url] for more info. Link to comment https://forums.phpfreaks.com/topic/34186-whats-in-front-of-functions-in-classes/#findComment-160835 Share on other sites More sharing options...
Finwyn Posted January 15, 2007 Author Share Posted January 15, 2007 Thanks for the help :) Link to comment https://forums.phpfreaks.com/topic/34186-whats-in-front-of-functions-in-classes/#findComment-160839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.