PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2002, Version 4.2.2
+- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
- Report the right exit code after a call to exit(). (Edin)
13 May 2002, Version 4.2.1
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos);
while (num_req_val && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTANT) {
-#ifdef HAVE_RANDOM
- randval = random();
-#else
-#ifdef HAVE_LRAND48
- randval = lrand48();
-#else
- randval = rand();
-#endif
-#endif
+ randval = php_rand(TSRMLS_C);
if ((double)(randval/(PHP_RAND_MAX+1.0)) < (double)num_req_val/(double)num_avail) {
/* If we are returning a single result, just do it. */