Jump to content

Whats in front of functions in classes?


Finwyn

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.