<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class NumberUtil { public static function decToD62($y6DV5) { goto H4SwY; H4SwY: $cJXa5 = 62; goto s_jsL; lKVZF: $bCCWW = ''; goto TepxE; s_jsL: $kaHJQ = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto lKVZF; aP1DG: return $bCCWW; goto w0xvn; TepxE: do { $bCCWW = $kaHJQ[bcmod($y6DV5, $cJXa5)] . $bCCWW; $y6DV5 = bcdiv($y6DV5, $cJXa5); } while ($y6DV5 > 0); goto aP1DG; w0xvn: } public static function d62ToDec($y6DV5) { goto aEkaR; QXaD3: for ($jqibn = 0; $jqibn < $bdcGr; $jqibn++) { $wzoew = strpos($kaHJQ, $y6DV5[$jqibn]); $WN46k = bcadd(bcmul(bcpow($E_44J, $bdcGr - $jqibn - 1), $wzoew), $WN46k); } goto VHdoB; jpiU4: $kaHJQ = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto F2Ygh; Uq3P9: $WN46k = 0; goto QXaD3; VHdoB: return $WN46k; goto RMP7J; F2Ygh: $bdcGr = strlen($y6DV5); goto Uq3P9; i1cOF: $y6DV5 = strval($y6DV5); goto jpiU4; aEkaR: $E_44J = 62; goto i1cOF; RMP7J: } public static function randomInt($j5Pz1, $ieIY5) { if ($j5Pz1 == $ieIY5) { return $j5Pz1; } return rand($j5Pz1, $ieIY5); } public static function randomDecimal($j5Pz1, $ieIY5) { goto Fb_ZJ; faMGg: return bcdiv($cBDsM, 100, 2); goto H75Ar; Fb_ZJ: if ($j5Pz1 == $ieIY5) { return $j5Pz1; } goto Wnyop; Wnyop: $cBDsM = rand(intval(bcmul($j5Pz1, 100)), intval(bcmul($ieIY5, 100))); goto faMGg; H75Ar: } public static function numToZH($ZQCyb) { goto jVBnz; wBiyE: return $j9Bnb; goto ymfrm; x1tEV: for ($jqibn = 0; $jqibn < $biJqN; $jqibn++) { $IXv_u = (int) $HGDJ1[$jqibn]; $pMMQk = $biJqN - $jqibn - 1; if ($IXv_u != 0) { $j9Bnb .= $QOpUV[$IXv_u] . $OeQCL[$pMMQk]; } else { if ($j9Bnb[strlen($j9Bnb) - 1] !== $QOpUV[0]) { $j9Bnb .= $QOpUV[$IXv_u]; } } } goto bjrar; lsblH: $biJqN = strlen($HGDJ1); goto MQVQd; P0S1G: if ($ZQCyb == 0) { return $QOpUV[0]; } goto EtD7P; MQVQd: $j9Bnb = ''; goto x1tEV; bjrar: if ($biJqN > 1 && $HGDJ1[0] == 1 && $j9Bnb[0] == $QOpUV[1]) { $j9Bnb = substr($j9Bnb, 1); } goto wBiyE; EtD7P: $HGDJ1 = strval($ZQCyb); goto lsblH; jVBnz: $QOpUV = array('零', '一', '二', '三', '四', '五', '六', '七', '八', '九'); goto rn4p0; rn4p0: $OeQCL = array('', '十', '百', '千', '万', '亿'); goto P0S1G; ymfrm: } }