|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7480 next(), end(), prev(), reset() etc. don't return references
Submitted: 2000-10-26 09:26 UTC Modified: 2002-01-06 12:15 UTC
From: mog at linux dot nu Assigned:
Status: Duplicate Package: Feature/Change Request
PHP Version: 4.0.1pl2 OS: RedHat Linux 7.0
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: mog at linux dot nu
New email:
PHP Version: OS:


 [2000-10-26 09:26 UTC] mog at linux dot nu
next(), end(), prev(), reset() etc. don't return references

meaning this example code won't work as it's thought to do:

$array1 = array('element1','element2');
$array2 = array(&$array1);

next(current($array2)); // here the internal pointer is changed in the copy of array1 that is returned and is in not referenced to to the real $array1 as it should
current(current($array2)); // should return "element2"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-06 11:47 UTC]
dupe of 7578. 
 [2002-01-06 12:01 UTC]
dupes are bogus..
 [2002-01-06 12:15 UTC]
actually they are dublicates, silly me.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 21 15:01:24 2023 UTC