From:             david dot tulloh at anu dot edu dot au
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  shuffle clobbers keys, this is not documented

Description:
------------
shuffle clobbers the keys in the array, this should probably be
documented, currently it is not mentioned.

Reproduce code:
---------------
$a = array('hi'=>'a', 'fred'=>'b', 'how'=>'c', 'is'=>'d', 'wilma'=>'e');
shuffle($a);
Array
(
    [0] => b
    [1] => c
    [2] => a
    [3] => e
    [4] => d
)


-- 
Edit bug report at http://bugs.php.net/?id=34229&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34229&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34229&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34229&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34229&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34229&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34229&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34229&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34229&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34229&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34229&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34229&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34229&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34229&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34229&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34229&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34229&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34229&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34229&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34229&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34229&r=mysqlcfg

Reply via email to