note 38944 added to language.variables.predefined

From: Date: Tue, 13 Jan 2004 01:51:50 +0000
Subject: note 38944 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-63387@lists.php.net to get a copy of this message
Just thought it might help someone to know that the variable names for the superglobals cannot be relied upon to be case-insensitive. In other words, to be sure your scripts will run correctly, you must use $_GET, $_POST, $_COOKIE, etc., and *not* $_get, $_Get; $_post, $_Post; $_cookie, $_Cookie... or whatever. (I just spent an hour troubleshooting a script for someone and finally figured out the reason it wasn't working was that they were using "$_Get" and "$_Post" and these don't work.) I found that the superglobal variablenames are case-sensitive on PHP 4.3.2/4.3.3 for Win32 and 4.3.2 on Linux, and I think that's enough to prove the point that it's not safe to regard them as otherwise. ---- Manual Page -- http://www.php.net/manual/en/language.variables.predefined.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38944 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38944&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38944&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63387) next »