php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17129 Shuffle doesn't work just in first two itens of array
Submitted: 2002-05-09 16:53 UTC Modified: 2002-08-23 21:33 UTC
Votes:11
Avg. Score:4.5 ± 0.7
Reproduced:11 of 11 (100.0%)
Same Version:9 (81.8%)
Same OS:11 (100.0%)
From: cristian at siens dot com dot br Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.2.1 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cristian at siens dot com dot br
New email:
PHP Version: OS:

 

 [2002-05-09 16:53 UTC] cristian at siens dot com dot 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. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-04 14:05 UTC] eru@php.net
Verified during the Bughunt. Seems to work with 4.1.1
 [2002-07-04 14:45 UTC] sniper@php.net
Works fine with latest CVS (HEAD, 4.3.0-dev).

 [2002-07-04 14:46 UTC] sniper@php.net
oops..I tested with Linux. No idea of win32.

 [2002-07-04 14:47 UTC] tal@php.net
Okay, verified with 4.3.0-dev snapshot from July 4th.

-Tal
 [2002-08-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-08-14 03:07 UTC] yohgaki@php.net
Dup #18401
 [2002-08-23 21:33 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 16:01:31 2024 UTC