Forum PHP 2017

Voting

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

The Note You're Voting On

steve at dbnsystems dot com
9 months ago
The following version could be even faster, unless anyone may come with a good reason why this wouldn't be a good practice:

<pre>
function unregister_globals() {
    if (ini_get(register_globals)) {
        $array = array('_REQUEST', '_SESSION', '_SERVER', '_ENV', '_FILES');
        foreach ($array as $value) {
            $$value = [];
        }
    }
}
</pre>

<< Back to user notes page

To Top