Req #80746 [NEW]: shuffle really should maintain key=>value relation

From: Date: Sat, 13 Feb 2021 16:17:10 +0000
Subject: Req #80746 [NEW]: shuffle really should maintain key=>value relation
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232134@lists.php.net to get a copy of this message
From: szfjozsef at gmail dot com Operating system: Irrelevant PHP version: Irrelevant Package: *General Issues Bug Type: Feature/Change Request Bug description:shuffle really should maintain key=>value relation Description: ------------ --- From manual page: https://php.net/function.shuffle --- People around the world are struggling by using the shuffle() function. There is absolutely no reason to reset the keys to 0,1,2,3 when shuffling the array. Please make shuffle() maintain the keys. Expected result: ---------------- call shuffle() and move on. Actual result: -------------- Have to write cumbersome, long, inefficient functions just to restore the key=>value associations. -- Edit bug report at https://bugs.php.net/bug.php?id=80746&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80746&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80746&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80746&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80746&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80746&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80746&r=support Expected behavior: https://bugs.php.net/fix.php?id=80746&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80746&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80746&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80746&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80746&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80746&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80746&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80746&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80746&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80746&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80746&r=mysqlcfg

« previous php.bugs (#232134) next »