|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
2 + 3 = ?
Subscribe to this entry?

 [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: Wed Sep 27 16:01:25 2023 UTC