[PHP-BUG] Bug #61963 [NEW]: array_rand seed no refresh bug
From: Operating system: window xp sp3 PHP version: 5.3.12 Package: Arrays related Bug Type: Bug Bug description:array_rand seed no refresh bug Description: run test_array_rand.php Test script: --- Expected result: make rand(0, 1) random Actual result: -- rand(0, 1) no longer random -- Edit bug report at https://bugs.php.net/bug.php?id=61963&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61963&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61963&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61963&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61963&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61963&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61963&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61963&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61963&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61963&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61963&r=support Expected behavior: https://bugs.php.net/fix.php?id=61963&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61963&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61963&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61963&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61963&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61963&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61963&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61963&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61963&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61963&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61963&r=mysqlcfg
Bug #61963 [Opn]: array_rand seed use up
Edit report at https://bugs.php.net/bug.php?id=61963&edit=1 ID: 61963 User updated by:bsnxff at gmail dot com Reported by:bsnxff at gmail dot com -Summary:array_rand seed no refresh bug +Summary:array_rand seed use up Status: Open Type: Bug Package:Arrays related Operating System: window xp sp3 PHP Version:5.3.12 Block user comment: N Private report: N New Comment: No one going to take this bug? Previous Comments: [2012-05-06 11:42:59] bsnxff at gmail dot com Description: run test_array_rand.php Test script: --- Expected result: make rand(0, 1) random Actual result: -- rand(0, 1) no longer random -- Edit this bug report at https://bugs.php.net/bug.php?id=61963&edit=1
Bug #61963 [Nab]: array_rand seed use up
Edit report at https://bugs.php.net/bug.php?id=61963&edit=1 ID: 61963 User updated by:bsnxff at gmail dot com Reported by:bsnxff at gmail dot com Summary:array_rand seed use up Status: Not a bug Type: Bug Package:Arrays related Operating System: window xp sp3 PHP Version:5.3.12 Block user comment: N Private report: N New Comment: Yes mt_rand works :S Me bad luck. Previous Comments: [2012-05-11 04:42:19] ras...@php.net because it makes no sense and on operating systems with a decent random number generator built in there is no bug. Windows XP is not such an operating system. You can try mt_rand() and see if you have more luck with that. rand() gives you the OS-native pseudo-random generator. [2012-05-11 04:04:42] bsnxff at gmail dot com No one going to take this bug? [2012-05-06 11:42:59] bsnxff at gmail dot com Description: run test_array_rand.php Test script: --- Expected result: make rand(0, 1) random Actual result: -- rand(0, 1) no longer random -- Edit this bug report at https://bugs.php.net/bug.php?id=61963&edit=1
Bug #61963 [Nab]: array_rand seed use up
Edit report at https://bugs.php.net/bug.php?id=61963&edit=1 ID: 61963 User updated by:bsnxff at gmail dot com Reported by:bsnxff at gmail dot com Summary:array_rand seed use up Status: Not a bug Type: Bug Package:Arrays related Operating System: window xp sp3 PHP Version:5.3.12 Block user comment: N Private report: N New Comment: Have you tested this case? rand() will return fixed values not random values. but mt_rand() works this is not what user expected. Previous Comments: [2012-05-11 07:17:21] bsnxff at gmail dot com Yes mt_rand works :S Me bad luck. [2012-05-11 04:42:19] ras...@php.net because it makes no sense and on operating systems with a decent random number generator built in there is no bug. Windows XP is not such an operating system. You can try mt_rand() and see if you have more luck with that. rand() gives you the OS-native pseudo-random generator. [2012-05-11 04:04:42] bsnxff at gmail dot com No one going to take this bug? [2012-05-06 11:42:59] bsnxff at gmail dot com Description: run test_array_rand.php Test script: --- Expected result: make rand(0, 1) random Actual result: -- rand(0, 1) no longer random -- Edit this bug report at https://bugs.php.net/bug.php?id=61963&edit=1
Bug #61963 [Nab]: array_rand seed use up
Edit report at https://bugs.php.net/bug.php?id=61963&edit=1 ID: 61963 User updated by:bsnxff at gmail dot com Reported by:bsnxff at gmail dot com Summary:array_rand seed use up Status: Not a bug Type: Bug Package:Arrays related Operating System: window xp sp3 PHP Version:5.3.12 Block user comment: N Private report: N New Comment: Thanks ! Previous Comments: [2012-05-11 07:30:31] ras...@php.net Yes, I tested your case. On my Linux box I get random values. Like I said, it depends on your operating system's pseudo-random generator. [2012-05-11 07:27:30] bsnxff at gmail dot com Have you tested this case? rand() will return fixed values not random values. but mt_rand() works this is not what user expected. [2012-05-11 07:17:21] bsnxff at gmail dot com Yes mt_rand works :S Me bad luck. [2012-05-11 04:42:19] ras...@php.net because it makes no sense and on operating systems with a decent random number generator built in there is no bug. Windows XP is not such an operating system. You can try mt_rand() and see if you have more luck with that. rand() gives you the OS-native pseudo-random generator. [2012-05-11 04:04:42] bsnxff at gmail dot com No one going to take this bug? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61963 -- Edit this bug report at https://bugs.php.net/bug.php?id=61963&edit=1