Bug #7480 Updated: next(), end(), prev(), reset() etc. don't return references

From: Date: Sun, 06 Jan 2002 16:47:32 +0000
Subject: Bug #7480 Updated: next(), end(), prev(), reset() etc. don't return references
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76057@lists.php.net to get a copy of this message
ID: 7480
Updated by: jan
Reported By: mog@linux.nu
Old Status: Open
Status: Closed
Bug Type: Feature/Change Request
Operating System: RedHat Linux 7.0
PHP Version: 4.0.1pl2
New Comment:

dupe of 7578. 

Previous Comments:
------------------------------------------------------------------------

[2000-10-26 09:26:40] mog@linux.nu

next(), end(), prev(), reset() etc. don't return references

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

<?PHP
$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"
?>

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=7480&edit=1



Thread (1 message)

  • jan@php.net
  • Unknown Message
    • jan@php.net
« previous php.dev (#76057) next »