Jump to content

variable scope


joesaddigh

Recommended Posts

Hi,

 

Is there any way of making a file which contains a member variable which I can then access by using a getter or setter function. If so can I do this from another file. For example in C++ you can make a private variable and access it from another class by using a public getter method which I could access via a pointer to that class.

 

Is there something simmilar that I could do with php??

 

Thanks

 

Joe

Link to comment
https://forums.phpfreaks.com/topic/199159-variable-scope/
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.