Home
last modified time | relevance | path

Searched refs:min (Results 1 – 25 of 142) sorted by relevance

123456

/php-src/ext/standard/tests/array/
H A Dmin_int_float_optimisation.phpt9 var_dump(min(10, 5, 3, 2));
10 var_dump(min(2, 3, 5, 10));
11 var_dump(min(10, 5, 3.5, 2));
12 var_dump(min(2, 3.5, 5, 10));
13 var_dump(min(10, 5, "3", 2));
14 var_dump(min(2, "3", 5, 10));
15 var_dump(min(2, 3, "1", 10));
23 var_dump(min(10.5, 5.5, 3.5, 2.5));
24 var_dump(min(2.5, 3.5, 5.5, 10.5));
25 var_dump(min(10.5, 5.5, 3, 2.5));
[all …]
H A Dmin_variation2.phpt2 Test variations in usage of min()
11 var_dump(min(array(2,1,2)));
12 var_dump(min(array(-2,1,2)));
13 var_dump(min(array(2.1,2.11,2.09)));
14 var_dump(min(array("", "t", "b")));
15 var_dump(min(array(false, true, false)));
16 var_dump(min(array(true, false, true)));
17 var_dump(min(array(1, true, false, true)));
18 var_dump(min(array(0, true, false, true)));
19 var_dump(min(array(0, 1, array(2,3))));
[all …]
H A Dmin.phpt2 min() tests
9 var_dump(min(1));
15 var_dump(min(array()));
21 var_dump(min(new stdclass));
26 var_dump(min(2,1,2));
27 var_dump(min(2.1,2.11,2.09));
28 var_dump(min("", "t", "b"));
29 var_dump(min(false, true, false));
30 var_dump(min(true, false, true));
31 var_dump(min(1, true, false, true));
[all …]
H A Dmin_basic.phpt2 Test return type and value for expected input min()
11 var_dump(min(2,1,2));
12 var_dump(min(-2,1,2));
13 var_dump(min(2.1,2.11,2.09));
14 var_dump(min("", "t", "b"));
15 var_dump(min(false, true, false));
16 var_dump(min(true, false, true));
17 var_dump(min(1, true, false, true));
18 var_dump(min(0, true, false, true));
19 var_dump(min(0, 1, array(2,3)));
H A Dmin_variation1.phpt2 Test variations in usage of min()
10 var_dump(min(2147483645, 2147483646) );
11 var_dump(min(2147483647, 2147483648) );
12 var_dump(min(2147483646, 2147483648) );
13 var_dump(min(-2147483647, -2147483646) );
14 var_dump(min(-2147483648, -2147483647) );
15 var_dump(min(-2147483649, -2147483647) );
19 var_dump(min(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,…
H A Dmin_basiclong_64bit.phpt2 Test min function : 64bit long tests
27 var_dump(min($arrayVals));
28 var_dump(min($longVals));
/php-src/ext/random/tests/01_functions/
H A Dmt_rand_basic.phpt25 $min = array(10,
37 for ($x = 0; $x < count($min); $x++) {
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
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.phpt25 $min = array(10,
37 for ($x = 0; $x < count($min); $x++) {
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
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 …]
/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()
87 return min; 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()
115 return min; 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()
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
145 Z_PARAM_DOUBLE(min) in PHP_METHOD()
151 if (!zend_finite(min)) { 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
241 Z_PARAM_LONG(min) in PHP_METHOD()
245 if (UNEXPECTED(max < min)) { in PHP_METHOD()
[all …]
H A Drandom.c468 return php_mt_rand_range(min, max);
478 return (zend_long) (offset + min);
526 zend_long min, max; local
535 Z_PARAM_LONG(min)
539 if (UNEXPECTED(max < min)) {
564 zend_long min, max; local
573 Z_PARAM_LONG(min)
577 if (max < min) {
616 zend_long min, max, result; local
619 Z_PARAM_LONG(min)
[all …]
H A Drandom.stub.php26 function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} argument
28 function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} argument
38 function random_int(int $min, int $max): int {} argument
140 …public function getFloat(float $min, float $max, IntervalBoundary $boundary = IntervalBoundary::Cl… argument
142 public function getInt(int $min, int $max): int {} argument
H A Dphp_random.h61 PHPAPI zend_long php_mt_rand_range(zend_long min, zend_long max);
62 PHPAPI zend_long php_mt_rand_common(zend_long min, zend_long max);
91 zend_long (*range)(void *state, zend_long min, zend_long max);
159 PHPAPI zend_long php_random_range(php_random_algo_with_state engine, zend_long min, zend_long max);
185 PHPAPI double php_random_gammasection_closed_open(php_random_algo_with_state engine, double min, do…
186 PHPAPI double php_random_gammasection_closed_closed(php_random_algo_with_state engine, double min, …
187 PHPAPI double php_random_gammasection_open_closed(php_random_algo_with_state engine, double min, do…
188 PHPAPI double php_random_gammasection_open_open(php_random_algo_with_state engine, double min, doub…
H A Dengine_secure.c40 static zend_long range(void *state, zend_long min, zend_long max) in range() argument
44 php_random_int_throw(min, max, &result); in range()
/php-src/ext/random/tests/03_randomizer/methods/
H A DgetFloat_error.phpt88 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
89 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
90 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
99 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
100 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
101 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
110 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
111 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
112 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
121 Random\Randomizer::getFloat(): Argument #1 ($min) must be finite
[all …]
H A DgetFloat_extreme_range.phpt25 $min = -1.6e308;
27 printf("%.17g\n", $min);
30 printf("%.17g\n", $r->getFloat($min, $max));
31 printf("%.17g\n", $r->getFloat($min, $max));
32 printf("%.17g\n", $r->getFloat($min, $max));
H A DgetFloat_opposite_signs.phpt27 $min = -1;
29 printf("%.17g\n", $min);
34 $float = $r->getFloat($min, $max);
/php-src/ext/filter/tests/
H A D046.phpt10 $min = "-2147483648";
15 $min = "-9223372036854775808";
34 test_validation($min, "min");
44 min filtered: int(-%d)
45 min is_long: bool(true)
46 min equal: bool(true)
H A Dfilter_ipv4_rfc6890.phpt23 list($min, $max) = $range;
25 var_dump(filter_var($min, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE));
77 list($min, $max) = $range;
79 var_dump(filter_var($min, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE));
/php-src/ext/date/tests/
H A Dgmmktime_variation7.phpt9 $min = 8;
18 var_dump( gmmktime($hour, $min) );
21 var_dump( gmmktime($hour, $min, $sec) );
24 var_dump( gmmktime($hour, $min, $sec, $mon) );
27 var_dump( gmmktime($hour, $min, $sec, $mon, $day) );
H A Dgmmktime_variation8.phpt9 $min = 010;
16 var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
20 $min = 0x8;
27 var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
/php-src/ext/standard/tests/array/array_walk/
H A Darray_walk_variation8.phpt8 * min function
19 echo "-- With 'min' built-in function --\n";
20 var_dump( array_walk($input, "min"));
35 -- With 'min' built-in function --
H A Darray_walk_recursive_variation8.phpt8 * min function
19 echo "-- With 'min' built-in function --\n";
20 var_dump( array_walk_recursive($input, "min"));
35 -- With 'min' built-in function --
/php-src/ext/standard/tests/general_functions/
H A Dbug76717.phpt6 $min = eval('return '.var_export(PHP_INT_MIN, true).';');
8 var_dump($min === PHP_INT_MIN);

Completed in 40 milliseconds

123456