|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-27 19:48 UTC] waldschrott@php.net
[2000-08-11 06:11 UTC] andi@php.net
[2000-08-11 06:18 UTC] waldschrott@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 10:00:01 2025 UTC |
1.) Serious bug, nesting of foreach() does not work if the nested foreach() works with a copy of the same var. Code below results in... "b0a0a1a2a3a4a5a6" instead of "b0a0a1a2a3a4a5a6b1a0a2....b6a0a1a2a3a4a5a6" foreach() copies the array it uses to use the pointer internally, why doesn?t nesting work? That?s a bug that will definitively affect users... $b=$a=array(0,1,2,3,4,5,6); foreach($b AS $test) { print 'b'.$test; foreach ($a AS $test2) { print 'a'.$test2; } } 2.) Once again this can be "fixed" using this strange snipplet: $b=&$b; Which should BTW, (in my eyes) not work, because $b=&array(0,1,2,3,4,5,6) does not work too.