create superglobal variables in php?

is there a way to create my own custom superglobal variables like $_POST and $_GET?

Answer

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

class myGlobals {

   static $myVariable;

}

function a() {

  print myGlobals::$myVariable;

}

Leave a Reply

Your email address will not be published. Required fields are marked *