In PHP recursive functions are being kept track of using the system stack. This mechanism has a very limited memory capacity. Excessive recursions may cause it to overflow, resulting in a PHP crash.

Magic Quotes Normalization Routine v2.0
<?php
if (get_magic_quotes_gpc()) {
    
$input = array(&$_GET, &$_POST, &$_COOKIE, &$_ENV, &$_SERVER);
    while (list(
$k,$v) = each($input)) {
        foreach (
$v as $key => $val) {
            if (!
is_array($val)) {
                
$input[$k][$key] = stripslashes($val);
                continue;
            }
            
$input[] =& $input[$k][$key];
        }
    }
    unset(
$input);
}
?>