if (version_compare(phpversion(), '5.3', '<')) { function remove_magic_quotes($array) { foreach ($array as $k => $v) { $array[$k] = is_array($v) ? remove_magic_quotes($v) : stripslashes($v); return $array; } } set_magic_quotes_runtime(0); //PHP 5.2- if (get_magic_quotes_gpc()) { //PHP 5.3- $_GET = remove_magic_quotes($_GET); $_POST = remove_magic_quotes($_POST); $_COOKIE = remove_magic_quotes($_COOKIE); ini_set('magic_quotes_gpc', 0); }}
if (version_compare(phpversion(), '5.4', '<')) {...}