php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52771 array(key => value) incorrect behaviour when key="join"
Submitted: 2010-09-03 19:09 UTC Modified: 2010-09-03 19:16 UTC
From: mpchanzy at yahoo dot ca Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mpchanzy at yahoo dot ca
New email:
PHP Version: OS:

 

 [2010-09-03 19:09 UTC] mpchanzy at yahoo dot ca
Description:
------------
I didn't find information on this bug online and couldn't update my version.
I have php 5.2.6 (installed with wampserver).

The bug is easy to reproduce so I thought I should just let you know as it may be related to other bugs that interpret the key value instead of reading it as a string in a 2D-array.

$params[] = array ("join" => "a", "join" => "b"); echo($params[0]);echo($params[0]);
returns "b" instead of "a"  
It seems as though when the key="join", previous entries of the array are deleted. 



Test script:
---------------
$params[] = array ("join" => "a", "join" => "b");
echo($params[0]);


Expected result:
----------------
I should be getting "a" 


Actual result:
--------------
I get "b"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-03 19:16 UTC] mpchanzy at yahoo dot ca
-Status: Open +Status: Closed
 [2010-09-03 19:16 UTC] mpchanzy at yahoo dot ca
sorry it's not a bug.
For some reason I thought key=>value had to be unique...I've been working too much.
 [2010-09-03 19:16 UTC] rasmus@php.net
-Status: Closed +Status: Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 16:08:09 2025 UTC