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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at photography-on-the dot net
New email:
PHP Version: OS:

 

 [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: Mon Dec 09 23:01:27 2024 UTC