芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/shimoda/vendor/paragonie/random_compat/lib/cast_to_int.php
operators might accidentally let a float * through. * * @param int|float $number The number we want to convert to an int * @param boolean $fail_open Set to true to not throw an exception * * @return float|int * * @throws TypeError */ function RandomCompat_intval($number, $fail_open = false) { if (is_int($number) || is_float($number)) { $number += 0; } elseif (is_numeric($number)) { $number += 0; } if ( is_float($number) && $number > ~PHP_INT_MAX && $number < PHP_INT_MAX ) { $number = (int) $number; } if (is_int($number)) { return (int) $number; } elseif (!$fail_open) { throw new TypeError( 'Expected an integer.' ); } return $number; } }