|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-14 05:00 UTC] kir@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 20:00:02 2025 UTC |
It's not a crash but a strange behaviour. Try this script and look the result (below) : <? $MyArray[00]="00"; $MyArray[01]="01"; $MyArray[02]="02"; $MyArray[03]="03"; $MyArray[04]="04"; $MyArray[05]="05"; $MyArray[06]="06"; $MyArray[07]="07"; $MyArray[08]="08"; $MyArray[09]="09"; $MyArray[10]="10"; for($i=0;$i<11;$i++) { printf("$i : %s<BR>\n",$MyArray[$i]); } ?> I've made my array with 0s because I've filled my indices with UltraEdit. If I remove the unwanted 0s, everything is ok. Here is the result (results are worst with previous versions of PHP 4.03 pl1) : 0 : 09 1 : 01 2 : 02 3 : 03 4 : 04 5 : 05 6 : 06 7 : 07 <b>Warning</b>: Undefined offset: 8 in <b>bug.php</b> on line <b>15</b> 8 : <b>Warning</b>: Undefined offset: 9 in <b>bug.php</b> on line <b>15</b> 9 : 10 : 10 My php.ini is the standard distributed file. Bye, Herv?