note 119855 added to security.globals

From: Date: Wed, 07 Sep 2016 02:23:56 +0000
Subject: note 119855 added to security.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-206514@lists.php.net to get a copy of this message
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> ---- Server IP: 72.52.91.14 Probable Submitter: 73.246.15.138 ---- Manual Page -- http://php.net/manual/en/security.globals.php Edit -- https://master.php.net/note/edit/119855 Del: integrated -- https://master.php.net/note/delete/119855/integrated Del: useless -- https://master.php.net/note/delete/119855/useless Del: bad code -- https://master.php.net/note/delete/119855/bad+code Del: spam -- https://master.php.net/note/delete/119855/spam Del: non-english -- https://master.php.net/note/delete/119855/non-english Del: in docs -- https://master.php.net/note/delete/119855/in+docs Del: other reasons-- https://master.php.net/note/delete/119855 Reject -- https://master.php.net/note/reject/119855 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206514) next »