note 99874 added to migration53.deprecated

From: Date: Sat, 11 Sep 2010 23:37:38 +0000
Subject: note 99874 added to migration53.deprecated
Groups: php.notes 
Request: Send a blank email to php-notes+get-172489@lists.php.net to get a copy of this message
If you previously defined register_long_arrays in php.ini and have a lot of code with $HTTP_*_VARS that need to be replaced the following may help on *.nix systems: sed -i 's/\$HTTP_\(.*\)_VARS/\$_\1/g' filename.php What this command does is replace all occurrences of $HTTP_*_VARS with their respective $_ counter parts, e.g. $HTTP_COOKIES_VAR to $_COOKIES To replace alot of files, you might combine it with the find command: find ./ -name "*.php" -exec sed -i 's/\$HTTP_\(.*\)_VARS/\$_\1/g' {} \; For other deprecated variables like $HTTP_POST_FILES change your sed arguments: sed -i 's/\$HTTP_POST_FILES/\$_FILES/g' Deprecated variables created by the register_long_arrays directive as far as I know are: $_POST $_GET $_SERVER $_ENV $_COOKIE $_SESSION ---- Server IP: 69.147.83.197 Probable Submitter: 68.15.106.166 ---- Manual Page -- http://www.php.net/manual/en/migration53.deprecated.php Edit -- https://master.php.net/note/edit/99874 Del: integrated -- https://master.php.net/note/delete/99874/integrated Del: useless -- https://master.php.net/note/delete/99874/useless Del: bad code -- https://master.php.net/note/delete/99874/bad+code Del: spam -- https://master.php.net/note/delete/99874/spam Del: non-english -- https://master.php.net/note/delete/99874/non-english Del: in docs -- https://master.php.net/note/delete/99874/in+docs Del: other reasons-- https://master.php.net/note/delete/99874 Reject -- https://master.php.net/note/reject/99874 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172489) next »