php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17574 variable name $2size allowed
Submitted: 2002-06-03 08:35 UTC Modified: 2002-06-03 08:41 UTC
From: php at photography-on-the dot net Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.0 OS: Windows XP
Private report: No CVE-ID: None
 [2002-06-03 08:35 UTC] php at photography-on-the dot net
I POST a form with
<select name="2size">

and I read it back with  
if (isset ($HTTP_POST_VARS['2size']))
{$size = $HTTP_POST_VARS['2size'];
}

PHP 4.2 accepts this without errors. Isn't this considered an illegal variable name? PHP Manual says: "A valid variable name starts with a letter or underscore,"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-03 08:41 UTC] mfischer@php.net
The manual is right, but there is no variable named '2size', it just a key in a hash which is perfectly valid.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC