create superglobal variables in php?

Static class variables can be referenced globally, e.g.:

class myGlobals {

   static $myVariable;

}

function a() {

  print myGlobals::$myVariable;

}

Leave a Comment