php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14175 it is possible to assign a invalid variable-name
Submitted: 2001-11-22 07:57 UTC Modified: 2001-11-22 08:00 UTC
From: gerw at dds dot nl Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0.5 OS: win98, freebsd
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gerw at dds dot nl
New email:
PHP Version: OS:

 

 [2001-11-22 07:57 UTC] gerw at dds dot nl
<?php
   $1 = "hello";
?>
This will produce an error.
That isn't very strange ;-)

But....

<?php
   ${"1"} = "hello";
?>

This is allowed.
Isn't this a bug?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-22 08:00 UTC] derick@php.net
Nope, this is not a bug, but expected behavior. You can also uses space and interpunction marks like this.
However, it's sitll veyr ugly.

Derick
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 12:01:23 2020 UTC