<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class NumberUtil { public static function decToD62($UQpbS) { goto qWZzm; Grg5G: $gbVzz = ''; goto nyXR6; FxElz: $jKqOo = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto Grg5G; nyXR6: do { $gbVzz = $jKqOo[bcmod($UQpbS, $hKkPV)] . $gbVzz; $UQpbS = bcdiv($UQpbS, $hKkPV); } while ($UQpbS > 0); goto XwZb3; XwZb3: return $gbVzz; goto u10WY; qWZzm: $hKkPV = 62; goto FxElz; u10WY: } public static function d62ToDec($UQpbS) { goto IC3Qp; KmBr2: $eNLXb = strlen($UQpbS); goto FWOlz; ZE0Gx: for ($JhHfm = 0; $JhHfm < $eNLXb; $JhHfm++) { $uC8AI = strpos($jKqOo, $UQpbS[$JhHfm]); $OSyqE = bcadd(bcmul(bcpow($wZ0QM, $eNLXb - $JhHfm - 1), $uC8AI), $OSyqE); } goto HpHVv; Dzfxz: $jKqOo = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto KmBr2; cJYME: $UQpbS = strval($UQpbS); goto Dzfxz; HpHVv: return $OSyqE; goto YtdN8; FWOlz: $OSyqE = 0; goto ZE0Gx; IC3Qp: $wZ0QM = 62; goto cJYME; YtdN8: } public static function randomInt($RyDaP, $iIKEF) { if ($RyDaP == $iIKEF) { return $RyDaP; } return rand($RyDaP, $iIKEF); } public static function randomDecimal($RyDaP, $iIKEF) { goto VTvSq; XdnDf: return bcdiv($ib3B9, 100, 2); goto PG3i4; ytoZf: $ib3B9 = rand(intval(bcmul($RyDaP, 100)), intval(bcmul($iIKEF, 100))); goto XdnDf; VTvSq: if ($RyDaP == $iIKEF) { return $RyDaP; } goto ytoZf; PG3i4: } public static function numToZH($euPEd) { goto BDZPz; EXQ7M: $av7KV = strlen($sGPqE); goto T3VNb; vhrfS: $sGPqE = strval($euPEd); goto EXQ7M; BDZPz: $UkphD = array('零', '一', '二', '三', '四', '五', '六', '七', '八', '九'); goto dTYzK; WbnEh: return $XPCCC; goto AEC_B; dTYzK: $OY1Xs = array('', '十', '百', '千', '万', '亿'); goto gf68n; T3VNb: $XPCCC = ''; goto H0yuC; H0yuC: for ($JhHfm = 0; $JhHfm < $av7KV; $JhHfm++) { $T1Dp9 = (int) $sGPqE[$JhHfm]; $ILsMd = $av7KV - $JhHfm - 1; if ($T1Dp9 != 0) { $XPCCC .= $UkphD[$T1Dp9] . $OY1Xs[$ILsMd]; } else { if ($XPCCC[strlen($XPCCC) - 1] !== $UkphD[0]) { $XPCCC .= $UkphD[$T1Dp9]; } } } goto ciN5x; gf68n: if ($euPEd == 0) { return $UkphD[0]; } goto vhrfS; ciN5x: if ($av7KV > 1 && $sGPqE[0] == 1 && $XPCCC[0] == $UkphD[1]) { $XPCCC = substr($XPCCC, 1); } goto WbnEh; AEC_B: } }