Jump to content

Static vs. Global


Superian

Recommended Posts

You shouldn't need to use scope at all if u write your functions properly

 

 

There are 3/4 "levels" to concern youself with

 

Super global (accessible anywhere)

Global (accessible in global and in functions through global calling)

Object internal (accessible in class as $this->VARNAME or in global as $objectvarname->varname)

Function vars (Only in function only way out is through a return or altercation of a global variable)

 

Link to comment
https://forums.phpfreaks.com/topic/115158-static-vs-global/#findComment-592167
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.