PHPKonf Istanbul PHP Conference 2019 - Call for Papers


Please answer this simple SPAM challenge: min(four, four)?
(Example: nine)

The Note You're Voting On

10 years ago
To expand on the nice bit of code Mike Willbanks wrote and Alexander tidied up, I turned the whole thing in a function that removes all the globals added by register_globals so it can be implemented in an included functions.php and doesn't litter the main pages too much.

//Undo register_globals
function unregister_globals() {
    if (
ini_get(register_globals)) {
$array = array('_REQUEST', '_SESSION', '_SERVER', '_ENV', '_FILES');
        foreach (
$array as $value) {
            foreach (
$GLOBALS[$value] as $key => $var) {
                if (
$var === $GLOBALS[$key]) {

<< Back to user notes page

To Top