#30496 [Bgs->Opn]: foreach wrong assignment with multidim arrays

From: Date: Thu, 21 Oct 2004 06:56:52 +0000
Subject: #30496 [Bgs->Opn]: foreach wrong assignment with multidim arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67868@lists.php.net to get a copy of this message
ID: 30496 User updated by: esartoni at omniaglobal dot net Reported By: esartoni at omniaglobal dot net -Status: Bogus +Status: Open Bug Type: Arrays related Operating System: Linux PHP Version: 4CVS-2004-10-20 (stable) New Comment: Try with Zend Optimizer 2.5.5 and let me know please. The bug is always there with php 4.3.10-dev. Previous Comments: ------------------------------------------------------------------------ [2004-10-20 18:25:28] esartoni at omniaglobal dot net I've found the problem. The bug appears only when using Zend Optimizer v2.5.5 Disabling the optimizer makes the code working. P.S.: This bug report is not bogus. :) Zend Optimizer is bogus! ------------------------------------------------------------------------ [2004-10-20 18:10:57] tony2001@php.net Works fine with latest snapshot (and other versions too). ------------------------------------------------------------------------ [2004-10-20 17:58:38] mserra at consrav dot net $a=array(1,2,3,4,5); foreach($a as $value) { echo $value."\n"; } OUTPUT: Array Array Array Array Array EXPECTED: 1 2 3 4 5 ------------------------------------------------------------------------ [2004-10-20 16:00:17] esartoni at omniaglobal dot net I'm sorry derick but here with v4.3.10-dev doesn't work! I've also tried with Solaris (SPARC) with same results. ------------------------------------------------------------------------ [2004-10-20 15:34:28] derick@php.net Works fine here. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30496 -- Edit this bug report at http://bugs.php.net/?id=30496&edit=1

« previous php.bugs (#67868) next »