In one of the interview question i get below question
“How you can restrict your developers in your custom build framework
to use$_GETvariable.”
We have our own custom build framework but in our framework we can not restrict people to use $_GET or $_POST in place of $this->request->get or $this->request->post.
We have method for accessing this variable but people most of the time uses $_GET or $_POST instead of our methods.
Can you please give me answer for that?
Thanks
In php.ini, remove the
GandPcharacters from thevariables_orderoption.Alternatively, if you want them to hate you forever, you could copy the contents of the superglobal, then set it to an instance of a class that throws an exception whenever you try to interact with it: