|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-08-15 17:15 UTC] mattc at wselectric dot com
  [2002-08-16 10:18 UTC] kalowsky@php.net
 | |||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 21:00:02 2025 UTC | 
Running my sample script with the loop set up to 65534 times will run without corrupting the array $a. If you run it as 65535 times or more, the array is corrupted, and the value of $b becomes an array, which then causes the following warnings to be generated: PHP Warning: Illegal offset type in /home/web/dev/docs/lookup/bug.php on line 9 Obviously the foreach and array assignments should not be corrupting the contents of array $a. Sample script: <script language="php"> $a = array(1); foreach($a as $b) { for($c = 0; $c < 65535; $c++) { $d = 1; $e[$d][] = array($b, $c); $f[$b][$c][] = $d; } } </script> done Configure command: ./configure \ --with-mysql=/usr/local/mysql \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-ftp \ --enable-track-vars \ --enable-versioning \ --with-zlib