php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2379 global variables get overwritten (all share a single storage location?)
Submitted: 1999-09-25 04:19 UTC Modified: 1999-09-25 11:53 UTC
From: peer at earthling dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 OS: Linux
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: peer at earthling dot net
New email:
PHP Version: OS:

 

 [1999-09-25 04:19 UTC] peer at earthling dot net
Description:

When I have multiple globals they all seem to share the same storage location. When you have var1 and var2 changing either one's value will change both, etc.

Sample script:

<html>
<body>
<?php
        global $p,$q;

        $p = "1";
        $q = "2";
        
        echo "p=$p, q=$q<br>";
?>      
</body>
</html>

Result:

p=2, q=2

Should be:

p=1, q=2

Modules:

Just followed the quick build described in the INSTALL file. Using Apache 1.3.9 as server.

System Specifics:
Linux kernel 2.2.9
Mandrake 6.0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-25 11:53 UTC] thies at cvs dot php dot net
please try the lastest CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC