|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
29 + 33 = ?
Subscribe to this entry?

 [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,"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-03 08:41 UTC]
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: Tue Apr 23 17:01:31 2024 UTC