Bug #17129: Shuffle doesn't work just in first two itens of array

From: Date: Thu, 09 May 2002 20:53:59 +0000
Subject: Bug #17129: Shuffle doesn't work just in first two itens of array
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7350@lists.php.net to get a copy of this message
From: cristian@siens.com.br Operating system: Windows 2000 PHP version: 4.2.0 PHP Bug Type: Arrays related Bug description: Shuffle doesn't work just in first two itens of array The function does not execute in the two first itens of the Array. Let us see the code below: <? $banner[0]="value1"; $banner[1]="value2"; $banner[2]="value3"; $banner[3]="value4"; $banner[4]="value5"; $banner[5]="value6"; shuffle($banner); echo $banner[0]; ?> The function always shows the value of second element, but if I to change the value for $banner[2] or higher, the function works, but don´t use the first two elements. This function works perfectly in another Linux server with php 4.1.2. -- Edit bug report at http://bugs.php.net/?id=17129&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17129&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17129&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17129&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17129&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17129&r=support Expected behavior: http://bugs.php.net/fix.php?id=17129&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17129&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17129&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17129&r=globals

« previous php.bugs (#7350) next »