|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
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,"


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