php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29285 taking array reference creates value
Submitted: 2004-07-20 20:35 UTC Modified: 2004-07-20 22:28 UTC
From: fred dot leitz at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.7 OS: FreeBSD 5.2.1-p9
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: fred dot leitz at gmail dot com
New email:
PHP Version: OS:

 

 [2004-07-20 20:35 UTC] fred dot leitz at gmail dot com
Description:
------------
When taking a reference from an associative array where the key does not exist a key is created and the value set to null.



Reproduce code:
---------------
$test = array();

$x = &$test["test"];
print_r($test);



Expected result:
----------------
Array (  )

Actual result:
--------------
Array ( [test] => )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-20 22:28 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 03:01:28 2024 UTC