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

From: Date: Sat, 13 Jul 2002 21:12:58 +0000
Subject: Bug #17129 Updated: Shuffle doesn't work just in first two itens of array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14092@lists.php.net to get a copy of this message
ID: 17129 Updated by: edink@php.net Reported By: cristian@siens.com.br -Status: Verified +Status: Feedback Bug Type: Arrays related Operating System: Windows 2000 PHP Version: 4.2.1 New Comment: Works fine for me. Please try http://ftp.proventum.net/pub/php/win32-snapshots/php4-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-07-04 14:47:32] tal@php.net Okay, verified with 4.3.0-dev snapshot from July 4th. -Tal ------------------------------------------------------------------------ [2002-07-04 14:46:38] sniper@php.net oops..I tested with Linux. No idea of win32. ------------------------------------------------------------------------ [2002-07-04 14:45:33] sniper@php.net Works fine with latest CVS (HEAD, 4.3.0-dev). ------------------------------------------------------------------------ [2002-07-04 14:05:11] eru@php.net Verified during the Bughunt. Seems to work with 4.1.1 ------------------------------------------------------------------------ [2002-05-09 16:53:59] cristian@siens.com.br 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 this bug report at http://bugs.php.net/?id=17129&edit=1

« previous php.bugs (#14092) next »