Changeset 36886 for trunk/src/wp-includes/random_compat/random_int.php
- Timestamp:
- 03/08/2016 05:14:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/random_compat/random_int.php
r35365 r36886 56 56 ); 57 57 } 58 58 59 try { 59 60 $max = RandomCompat_intval($max); … … 74 75 ); 75 76 } 77 76 78 if ($max === $min) { 77 79 return $min; … … 99 101 */ 100 102 if (!is_int($range)) { 103 101 104 /** 102 105 * Still safely calculate wider ranges. … … 112 115 $bytes = PHP_INT_SIZE; 113 116 $mask = ~0; 117 114 118 } else { 119 115 120 /** 116 121 * $bits is effectively ceil(log($range, 2)) without dealing with … … 182 187 */ 183 188 } while (!is_int($val) || $val > $max || $val < $min); 189 184 190 return (int) $val; 185 191 }
Note: See TracChangeset
for help on using the changeset viewer.