php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40484 Variables starting with numbers ($01) cause entire page to not display
Submitted: 2007-02-14 18:33 UTC Modified: 2007-02-14 19:53 UTC
From: david dot young at ghostknight dot us Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.2.1 OS: WIN XP PRO
Private report: No CVE-ID: None
 [2007-02-14 18:33 UTC] david dot young at ghostknight dot us
Description:
------------
When trying to parse text contained in any variable starting with a number ( ie $01 ) it fails to display ANY portion of the page. ( Server Data: Apache/2.0.59 (Win32) PHP/5.1.6 Server )

Reproduce code:
---------------
<?php
$01 = "online";
?>
<p>Status: <?php echo $01; ?></p>


Expected result:
----------------
the actual code is a bit more elaborate, but when i had originally set it for $01, it should have parsed an image stating ONLINE ( url @ http://www.ghostknight.us/SBC2/status.php ) 

Actual result:
--------------
I had to reform my variable to $bot01 in order to get it to parse.  Thinking this was an isolated incident, I added the rest of the variables, and even with $bot01, the other variables $02, $03, $04, etc., prevented ANY data from being parsed on the site.  Not even the HTML <title> data was produced.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-14 18:38 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 [2007-02-14 19:47 UTC] david dot young at ghostknight dot us
... what i dont understand, and its not covered in the link that was provided, is why, $01 would cause the entire page to not parse AT ALL. However, when a letter was put in front of the numbers, the variable parsed correctly.
 [2007-02-14 19:51 UTC] derick@php.net
From that page:
"A valid variable name starts with a letter or underscore"
 [2007-02-14 19:53 UTC] david dot young at ghostknight dot us
DOH! Thanks Derick - You Rock!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 01:01:31 2024 UTC