php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3309 unsetting a part of a copy of an array also
Submitted: 2000-01-25 06:08 UTC Modified: 2000-02-16 10:22 UTC
From: mitja at pristop dot si Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 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: mitja at pristop dot si
New email:
PHP Version: OS:

 

 [2000-01-25 06:08 UTC] mitja at pristop dot si
<?
$a["app"]["name"]="foo";
$b=$a;
unset($b["app"]);
echo $a["app"]["name"]; // doesn't output anything!
?>

workaround is $b=array_reverse(array_reverse($a)), but it's kind of stupid

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-16 10:22 UTC] andi at cvs dot php dot net
Thanks for the good bug report.
It is fixed in the current CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 10:01:32 2024 UTC