Home
last modified time | relevance | path

Searched refs:max (Results 1 – 25 of 258) sorted by relevance

1234567891011

/php-src/ext/standard/tests/array/
H A Dmax_int_float_optimisation.phpt9 var_dump(max(10, 5, 3, 2));
10 var_dump(max(2, 3, 5, 10));
11 var_dump(max(10, 5, 3.5, 2));
12 var_dump(max(2, 3.5, 5, 10));
13 var_dump(max(10, 5, "3", 2));
14 var_dump(max(2, "3", 5, 10));
15 var_dump(max(2, 3, "15", 10));
23 var_dump(max(10.5, 5.5, 3.5, 2.5));
24 var_dump(max(2.5, 3.5, 5.5, 10.5));
25 var_dump(max(10.5, 5.5, 3, 2.5));
[all …]
H A Dmax_variation2.phpt2 Test variations in usage of max()
11 var_dump(max(array(2,1,2)));
12 var_dump(max(array(-2,1,2)));
13 var_dump(max(array(2.1,2.11,2.09)));
14 var_dump(max(array("", "t", "b")));
15 var_dump(max(array(false, true, false)));
16 var_dump(max(array(true, false, true)));
17 var_dump(max(array(1, true, false, true)));
18 var_dump(max(array(0, true, false, true)));
19 var_dump(max(array(0, 1, array(2,3))));
[all …]
H A Dmax.phpt2 max() tests
9 var_dump(max(1));
15 var_dump(max(array()));
21 var_dump(max(new stdclass));
26 var_dump(max(2,1,2));
27 var_dump(max(2.1,2.11,2.09));
28 var_dump(max("", "t", "b"));
29 var_dump(max(false, true, false));
30 var_dump(max(true, false, true));
31 var_dump(max(1, true, false, true));
[all …]
H A Dmax_basic.phpt2 Test return type and value for expected input max()
11 var_dump(max(2,1,2));
12 var_dump(max(-2,1,2));
13 var_dump(max(2.1,2.11,2.09));
14 var_dump(max("", "t", "b"));
15 var_dump(max(false, true, false));
16 var_dump(max(true, false, true));
17 var_dump(max(1, true, false, true));
18 var_dump(max(0, true, false, true));
19 var_dump(max(0, 1, array(2,3)));
H A Dmax_variation1.phpt2 Test variations in usage of max()
10 var_dump(max(2147483645, 2147483646) );
11 var_dump(max(2147483647, 2147483648) );
12 var_dump(max(2147483646, 2147483648) );
13 var_dump(max(-2147483647, -2147483646) );
14 var_dump(max(-2147483648, -2147483647) );
15 var_dump(max(-2147483649, -2147483647) );
19 var_dump(max(0, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,0, 1 , 2,…
/php-src/ext/random/
H A Dgammasection.c76 double g = gamma_max(min, max); in php_random_gammasection_closed_open()
85 if (fabs(min) <= fabs(max)) { in php_random_gammasection_closed_open()
104 double g = gamma_max(min, max); in php_random_gammasection_closed_closed()
107 if (UNEXPECTED(max < min)) { in php_random_gammasection_closed_closed()
113 if (fabs(min) <= fabs(max)) { in php_random_gammasection_closed_closed()
124 return max; in php_random_gammasection_closed_closed()
136 double g = gamma_max(min, max); in php_random_gammasection_open_closed()
145 if (fabs(min) <= fabs(max)) { in php_random_gammasection_open_closed()
152 return max; in php_random_gammasection_open_closed()
164 double g = gamma_max(min, max); in php_random_gammasection_open_open()
[all …]
H A Dphp_random_csprng.h26 ZEND_ATTRIBUTE_NONNULL PHPAPI zend_result php_random_int(zend_long min, zend_long max, zend_long *r…
38 ZEND_ATTRIBUTE_NONNULL static inline zend_result php_random_int_throw(zend_long min, zend_long max,… in php_random_int_throw() argument
40 return php_random_int(min, max, result, true); in php_random_int_throw()
43 ZEND_ATTRIBUTE_NONNULL static inline zend_result php_random_int_silent(zend_long min, zend_long max in php_random_int_silent() argument
45 return php_random_int(min, max, result, false); in php_random_int_silent()
H A Drandomizer.c140 double min, max; in PHP_METHOD() local
146 Z_PARAM_DOUBLE(max) in PHP_METHOD()
156 if (!zend_finite(max)) { in PHP_METHOD()
170 if (UNEXPECTED(max <= min)) { in PHP_METHOD()
177 if (UNEXPECTED(max < min)) { in PHP_METHOD()
184 if (UNEXPECTED(max <= min)) { in PHP_METHOD()
191 if (UNEXPECTED(max <= min)) { in PHP_METHOD()
238 zend_long min, max; in PHP_METHOD() local
242 Z_PARAM_LONG(max) in PHP_METHOD()
245 if (UNEXPECTED(max < min)) { in PHP_METHOD()
[all …]
/php-src/ext/random/tests/01_functions/
H A Dmt_rand_basic.phpt31 $max = array(100,
39 $res = mt_rand($min[$x], $max[$x]);
42 … echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
48 echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
55 PASSED: range min = 0 max = 2147483647
57 mt_rand() tests with defined min and max value
58 PASSED: range min = 10 max = 100
59 PASSED: range min = 100 max = 1000
60 PASSED: range min = 10500 max = 1050000
61 PASSED: range min = 16 max = 65536
[all …]
H A Drand_basic.phpt31 $max = array(100,
39 $res = rand($min[$x], $max[$x]);
42 … echo "FAILED: res = ", $res, " min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
48 echo "PASSED: range min = ", intval($min[$x]), " max = ", intval($max[$x]), "\n";
55 PASSED: range min = 0 max = %i
57 rand() tests with defined min and max value
58 PASSED: range min = 10 max = 100
59 PASSED: range min = 100 max = 1000
60 PASSED: range min = 10500 max = 1050000
61 PASSED: range min = 16 max = 65536
[all …]
H A Dbug75170.phpt11 $max = 0x66666666;
14 $halves[(mt_rand(0, $max - 1) >> 1) & 1]++;
22 $max = 0x66666666;
25 $halves[(int) (mt_rand(0, $max - 1) / ($max / 2))]++;
/php-src/ext/random/tests/03_randomizer/methods/
H A DgetFloat_error.phpt91 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
92 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
93 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
102 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
103 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
104 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
113 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
114 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
115 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
124 Random\Randomizer::getFloat(): Argument #2 ($max) must be finite
[all …]
H A DgetFloat_extreme_range.phpt26 $max = 1.6e308;
28 printf("%.17g\n\n", $max);
30 printf("%.17g\n", $r->getFloat($min, $max));
31 printf("%.17g\n", $r->getFloat($min, $max));
32 printf("%.17g\n", $r->getFloat($min, $max));
/php-src/sapi/fpm/fpm/events/
H A Dpoll.c28 static int fpm_event_poll_init(int max);
67 static int fpm_event_poll_init(int max) in fpm_event_poll_init() argument
71 if (max < 1) { in fpm_event_poll_init()
76 pollfds = malloc(sizeof(struct pollfd) * max); in fpm_event_poll_init()
78 zlog(ZLOG_ERROR, "poll: unable to allocate %d events", max); in fpm_event_poll_init()
81 memset(pollfds, 0, sizeof(struct pollfd) * max); in fpm_event_poll_init()
84 for (i = 0; i < max; i++) { in fpm_event_poll_init()
89 active_pollfds = malloc(sizeof(struct pollfd) * max); in fpm_event_poll_init()
92 zlog(ZLOG_ERROR, "poll: unable to allocate %d events", max); in fpm_event_poll_init()
95 memset(active_pollfds, 0, sizeof(struct pollfd) * max); in fpm_event_poll_init()
[all …]
H A Depoll.c27 static int fpm_event_epoll_init(int max);
63 static int fpm_event_epoll_init(int max) /* {{{ */ in fpm_event_epoll_init() argument
65 if (max < 1) { in fpm_event_epoll_init()
70 epollfd = epoll_create(max + 1); in fpm_event_epoll_init()
77 epollfds = malloc(sizeof(struct epoll_event) * max); in fpm_event_epoll_init()
79 zlog(ZLOG_ERROR, "epoll: unable to allocate %d events", max); in fpm_event_epoll_init()
82 memset(epollfds, 0, sizeof(struct epoll_event) * max); in fpm_event_epoll_init()
85 nepollfds = max; in fpm_event_epoll_init()
H A Dport.c28 static int fpm_event_port_init(int max);
65 static int fpm_event_port_init(int max) /* {{{ */ in fpm_event_port_init() argument
74 if (max < 1) { in fpm_event_port_init()
79 events = malloc(sizeof(port_event_t) * max); in fpm_event_port_init()
81 zlog(ZLOG_ERROR, "port: Unable to allocate %d events", max); in fpm_event_port_init()
85 nevents = max; in fpm_event_port_init()
H A Dkqueue.c30 static int fpm_event_kqueue_init(int max);
70 static int fpm_event_kqueue_init(int max) /* {{{ */ in fpm_event_kqueue_init() argument
72 if (max < 1) { in fpm_event_kqueue_init()
82 kevents = calloc(max, sizeof(struct kevent)); in fpm_event_kqueue_init()
84 zlog(ZLOG_ERROR, "kevent: unable to allocate %d events", max); in fpm_event_kqueue_init()
88 nkevents = max; in fpm_event_kqueue_init()
/php-src/ext/filter/tests/
H A D046.phpt7 $max = sprintf("%d", PHP_INT_MAX);
8 switch($max) {
32 test_validation($max, "max");
38 max filtered: int(%d)
39 max is_long: bool(true)
40 max equal: bool(true)
/php-src/ext/standard/tests/general_functions/
H A Dvar_export_basic1.phpt17 '-2147483648' => '-2147483648', // max negative integer value
19 '2147483647' => 2147483647, // max positive integer value
25 "-0x80000000" => -0x7FFFFFFF - 1, // max negative integer as hexadecimal
26 "'0x7fffffff'" => '0x7fffffff', // max positive integer as hexadecimal
27 "0x7FFFFFFF" => 0x7FFFFFFF, // max positive integer as hexadecimal
30 "-020000000000" => -017777777777 - 1, // max negative integer as octal
31 "017777777777" => 017777777777, // max positive integer as octal
H A Dvar_export_basic1_32.phpt17 '-2147483648' => '-2147483648', // max negative integer value
19 '2147483647' => 2147483647, // max positive integer value
25 "-0x80000000" => -0x7FFFFFFF - 1, // max negative integer as hexadecimal
26 "'0x7fffffff'" => '0x7fffffff', // max positive integer as hexadecimal
27 "0x7FFFFFFF" => 0x7FFFFFFF, // max positive integer as hexadecimal
30 "-020000000000" => -017777777777 - 1, // max negative integer as octal
31 "017777777777" => 017777777777, // max positive integer as octal
H A Dintval.phpt15 '-2147483648', // max negative integer value
17 2147483647, // max positive integer value
23 -0x80000000, // max negative integer as hexadecimal
24 '0x7fffffff', // max positive integer as hexadecimal
25 0x7FFFFFFF, // max positive integer as hexadecimal
28 -020000000000, // max negative integer as octal
29 017777777777, // max positive integer as octal
75 '-0x80000001', // float value, beyond max negative int
76 '0x800000001', // float value, beyond max positive int
77 '020000000001', // float value, beyond max positive int
[all …]
/php-src/ext/date/tests/
H A Dformat-negative-timestamp.phpt8 $max = getrandmax();
9 $max_2 = $max / 2;
12 $new_tm = rand(1, $max);
/php-src/Zend/Optimizer/
H A Doptimize_temp_vars_5.c39 if (i > max) { \
40 max = i; \
54 int max = -1; in zend_optimize_temporary_variables() local
86 var = max; in zend_optimize_temporary_variables()
90 max = MAX(max, var + num); in zend_optimize_temporary_variables()
128 i = ++max; in zend_optimize_temporary_variables()
177 op_array->T = max + 1 + ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled in zend_optimize_temporary_variables()
/php-src/ext/standard/tests/strings/
H A Dsprintf_variation10.phpt12 -2147483648, // max negative integer value
14 2147483647, // max positive integer value
20 -0x80000000, // max negative integer as hexadecimal
21 0x7fffffff, // max positive integer as hexadecimal
22 0x7FFFFFFF, // max positive integer as hexadecimal
25 -020000000000, // max negative integer as octal
26 017777777777 // max positive integer as octal
H A Dsprintf_variation28.phpt18 -2147483648, // max negative integer value
20 2147483647, // max positive integer value
26 -0x80000000, // max negative integer as hexadecimal
27 0x7fffffff, // max positive integer as hexadecimal
28 0x7FFFFFFF, // max positive integer as hexadecimal
31 -020000000000, // max negative integer as octal
32 017777777777 // max positive integer as octal

Completed in 33 milliseconds

1234567891011