GRAYBYTE WORDPRESS FILE MANAGER5527

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/php81/usr/include/php/ext/standard/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/php81/usr/include/php/ext/standard//php_rand.h
/*
   +----------------------------------------------------------------------+
   | Copyright (c) The PHP Group                                          |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | https://www.php.net/license/3_01.txt                                 |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | license@php.net so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
   | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
   |          Zeev Suraski <zeev@php.net>                                 |
   |          Pedro Melo <melo@ip.pt>                                     |
   |          Sterling Hughes <sterling@php.net>                          |
   |                                                                      |
   | Based on code from: Shawn Cokus <Cokus@math.washington.edu>          |
   +----------------------------------------------------------------------+
 */

#ifndef PHP_RAND_H
#define	PHP_RAND_H

#include "php_lcg.h"
#include "php_mt_rand.h"

/* System Rand functions */
#ifndef RAND_MAX
#define RAND_MAX PHP_MT_RAND_MAX
#endif

#define PHP_RAND_MAX PHP_MT_RAND_MAX

/*
 * A bit of tricky math here.  We want to avoid using a modulus because
 * that simply tosses the high-order bits and might skew the distribution
 * of random values over the range.  Instead we map the range directly.
 *
 * We need to map the range from 0...M evenly to the range a...b
 * Let n = the random number and n' = the mapped random number
 *
 * Then we have: n' = a + n(b-a)/M
 *
 * We have a problem here in that only n==M will get mapped to b which
 # means the chances of getting b is much much less than getting any of
 # the other values in the range.  We can fix this by increasing our range
 # artificially and using:
 #
 #               n' = a + n(b-a+1)/M
 *
 # Now we only have a problem if n==M which would cause us to produce a
 # number of b+1 which would be bad.  So we bump M up by one to make sure
 # this will never happen, and the final algorithm looks like this:
 #
 #               n' = a + n(b-a+1)/(M+1)
 *
 * -RL
 */
#define RAND_RANGE_BADSCALING(__n, __min, __max, __tmax) \
	(__n) = (__min) + (zend_long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0)))

#ifdef PHP_WIN32
#define GENERATE_SEED() (((zend_long) ((zend_ulong) time(NULL) * (zend_ulong) GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg())))
#else
#define GENERATE_SEED() (((zend_long) ((zend_ulong) time(NULL) * (zend_ulong) getpid())) ^ ((zend_long) (1000000.0 * php_combined_lcg())))
#endif

PHPAPI void php_srand(zend_long seed);
PHPAPI zend_long php_rand(void);

#endif	/* PHP_RAND_H */

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 26 2025 08:39:05
root / linksafe
0755
base64.h
3.587 KB
April 09 2025 14:16:59
root / linksafe
0644
basic_functions.h
4.869 KB
April 09 2025 14:16:59
root / linksafe
0644
basic_functions_arginfo.h
125.208 KB
April 09 2025 14:16:59
root / linksafe
0644
crc32.h
4.793 KB
April 09 2025 14:16:59
root / linksafe
0644
crc32_x86.h
1.817 KB
April 09 2025 14:16:59
root / linksafe
0644
credits.h
1.525 KB
April 09 2025 14:16:59
root / linksafe
0644
credits_ext.h
5.236 KB
April 09 2025 14:16:59
root / linksafe
0644
credits_sapi.h
0.815 KB
April 09 2025 14:16:59
root / linksafe
0644
crypt_blowfish.h
0.771 KB
April 09 2025 14:16:59
root / linksafe
0644
crypt_freesec.h
0.646 KB
April 09 2025 14:16:59
root / linksafe
0644
css.h
1.045 KB
April 09 2025 14:16:59
root / linksafe
0644
datetime.h
1.145 KB
April 09 2025 14:16:59
root / linksafe
0644
dir_arginfo.h
1.832 KB
April 09 2025 14:16:59
root / linksafe
0644
dl.h
1.462 KB
April 09 2025 14:16:59
root / linksafe
0644
dl_arginfo.h
0.263 KB
April 09 2025 14:16:59
root / linksafe
0644
exec.h
1.273 KB
April 09 2025 14:16:59
root / linksafe
0644
file.h
3.929 KB
April 09 2025 14:16:59
root / linksafe
0644
flock_compat.h
2.063 KB
April 09 2025 14:16:59
root / linksafe
0644
fsock.h
1.218 KB
April 09 2025 14:16:59
root / linksafe
0644
head.h
1.528 KB
April 09 2025 14:16:59
root / linksafe
0644
hrtime.h
2.307 KB
April 09 2025 14:16:59
root / linksafe
0644
html.h
2.339 KB
April 09 2025 14:16:59
root / linksafe
0644
html_tables.h
472.263 KB
April 09 2025 14:16:59
root / linksafe
0644
info.h
22.942 KB
April 09 2025 14:16:59
root / linksafe
0644
md5.h
2.017 KB
April 09 2025 14:16:59
root / linksafe
0644
pack.h
1.048 KB
April 09 2025 14:16:59
root / linksafe
0644
pageinfo.h
1.152 KB
April 09 2025 14:16:59
root / linksafe
0644
php_array.h
2.24 KB
April 09 2025 14:16:59
root / linksafe
0644
php_assert.h
1.236 KB
April 09 2025 14:16:59
root / linksafe
0644
php_browscap.h
1.108 KB
April 09 2025 14:16:59
root / linksafe
0644
php_crypt.h
1.365 KB
April 09 2025 14:16:59
root / linksafe
0644
php_crypt_r.h
1.64 KB
April 09 2025 14:16:59
root / linksafe
0644
php_dir.h
1.282 KB
April 09 2025 14:16:59
root / linksafe
0644
php_dns.h
2.581 KB
April 09 2025 14:16:59
root / linksafe
0644
php_ext_syslog.h
1.165 KB
April 09 2025 14:16:59
root / linksafe
0644
php_filestat.h
2.104 KB
April 09 2025 14:16:59
root / linksafe
0644
php_fopen_wrappers.h
1.794 KB
April 09 2025 14:16:59
root / linksafe
0644
php_http.h
1.331 KB
April 09 2025 14:16:59
root / linksafe
0644
php_image.h
2.169 KB
April 09 2025 14:16:59
root / linksafe
0644
php_incomplete_class.h
2.15 KB
April 09 2025 14:16:59
root / linksafe
0644
php_lcg.h
1.312 KB
April 09 2025 14:16:59
root / linksafe
0644
php_mail.h
2.155 KB
April 09 2025 14:16:59
root / linksafe
0644
php_math.h
3.547 KB
April 09 2025 14:16:59
root / linksafe
0644
php_mt_rand.h
1.808 KB
April 09 2025 14:16:59
root / linksafe
0644
php_net.h
1.136 KB
April 09 2025 14:16:59
root / linksafe
0644
php_password.h
2.758 KB
April 09 2025 14:16:59
root / linksafe
0644
php_rand.h
3.052 KB
April 09 2025 14:16:59
root / linksafe
0644
php_random.h
1.861 KB
April 09 2025 14:16:59
root / linksafe
0644
php_smart_string.h
1.134 KB
April 09 2025 14:16:59
root / linksafe
0644
php_smart_string_public.h
1.141 KB
April 09 2025 14:16:59
root / linksafe
0644
php_standard.h
1.911 KB
April 09 2025 14:16:59
root / linksafe
0644
php_string.h
3.949 KB
April 09 2025 14:17:00
root / linksafe
0644
php_uuencode.h
1.177 KB
April 09 2025 14:17:00
root / linksafe
0644
php_var.h
3.408 KB
April 09 2025 14:17:00
root / linksafe
0644
php_versioning.h
1.183 KB
April 09 2025 14:17:00
root / linksafe
0644
proc_open.h
1.669 KB
April 09 2025 14:17:00
root / linksafe
0644
quot_print.h
1.226 KB
April 09 2025 14:17:00
root / linksafe
0644
scanf.h
1.95 KB
April 09 2025 14:17:00
root / linksafe
0644
sha1.h
1.624 KB
April 09 2025 14:17:00
root / linksafe
0644
streamsfuncs.h
1.11 KB
April 09 2025 14:17:00
root / linksafe
0644
url.h
2.085 KB
April 09 2025 14:17:00
root / linksafe
0644
url_scanner_ex.h
2.317 KB
April 09 2025 14:17:00
root / linksafe
0644
user_filters_arginfo.h
2.447 KB
April 09 2025 14:17:00
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF