Please answer this simple SPAM challenge: max(eight, three)?
(Example: nine)

The Note You're Voting On

moore at hs-furtwangen dot de
10 years ago
I had a look at the post from Dice, in which he suggested the function unregister_globals(). It didn't seem to work - only tested php 4.4.8 and 5.2.1 - so I made some tweaking to get it running. (I had to use $GLOBALS due to the fact that $$name won't work with superglobals).

//Undo register_globals
function unregister_globals() {
    if (
ini_get('register_globals')) {
$array = array('_REQUEST', '_FILES');
        foreach (
$array as $value) {
                foreach (
$GLOBALS[$value] as $key => $var) {
                    if (isset(
$GLOBALS[$key]) && $var === $GLOBALS[$key]) {
//echo 'found '.$key.' = '.$var.' in $'.$value."\n";                   

The echo was for debuging, thought it might come in handy.

<< Back to user notes page

To Top