|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63744 references in list()
Submitted: 2012-12-11 18:39 UTC Modified: 2016-12-29 01:28 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ninzya at inbox dot lv Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: Irrelevant OS: Any
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: ninzya at inbox dot lv
New email:
PHP Version: OS:


 [2012-12-11 18:39 UTC] ninzya at inbox dot lv
Would be good to have a possibility to extract array elements by ref like in test 

Test script:
$arr = array( 1, 2 );
list( &$first, &$second ) = $arr;


print_r( $arr);

Expected result:
array( 2, 1 )

Actual result:
PHP Parse error:  syntax error, unexpected '&', expecting ',' or ')' in ... on 
line 2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-27 21:06 UTC]
-Status: Open +Status: Duplicate
 [2016-03-27 21:06 UTC]
Duplicate of bug #7930 (albeit with a different syntax suggestion).
 [2016-12-29 01:27 UTC]
Actually a duplicate of #6768.
 [2016-12-29 01:28 UTC]
Duplicate of bug #6768
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 10:01:41 2021 UTC