<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class NumberUtil { public static function decToD62($zi9ft) { goto EWt0A; YPnyd: return $Z5nZL; goto CUQTI; EWt0A: $kn8dk = 62; goto yk1qT; fWTqu: $Z5nZL = ''; goto kIS03; yk1qT: $sGBS1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto fWTqu; kIS03: do { $Z5nZL = $sGBS1[bcmod($zi9ft, $kn8dk)] . $Z5nZL; $zi9ft = bcdiv($zi9ft, $kn8dk); } while ($zi9ft > 0); goto YPnyd; CUQTI: } public static function d62ToDec($zi9ft) { goto S5a7o; OxMYk: $sGBS1 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; goto nnA0Q; nnA0Q: $fEi15 = strlen($zi9ft); goto BmTL1; I1w94: $zi9ft = strval($zi9ft); goto OxMYk; S5a7o: $KXoNz = 62; goto I1w94; BmTL1: $z8Kgh = 0; goto IQr8_; IQr8_: for ($tMyPy = 0; $tMyPy < $fEi15; $tMyPy++) { $Xb0za = strpos($sGBS1, $zi9ft[$tMyPy]); $z8Kgh = bcadd(bcmul(bcpow($KXoNz, $fEi15 - $tMyPy - 1), $Xb0za), $z8Kgh); } goto ZG1nz; ZG1nz: return $z8Kgh; goto P8H26; P8H26: } public static function randomInt($B7NHd, $y1uR1) { if ($B7NHd == $y1uR1) { return $B7NHd; } return rand($B7NHd, $y1uR1); } public static function randomDecimal($B7NHd, $y1uR1) { goto vyYXM; vyYXM: if ($B7NHd == $y1uR1) { return $B7NHd; } goto OTRxs; qXlvK: return bcdiv($HDpl6, 100, 2); goto XKm9i; OTRxs: $HDpl6 = rand(intval(bcmul($B7NHd, 100)), intval(bcmul($y1uR1, 100))); goto qXlvK; XKm9i: } public static function numToZH($M5tgr) { goto BXV2d; I0yGA: for ($tMyPy = 0; $tMyPy < $jLnS0; $tMyPy++) { $a7H_O = (int) $MU6Q_[$tMyPy]; $dKGF5 = $jLnS0 - $tMyPy - 1; if ($a7H_O != 0) { $GlTLE .= $qoWbD[$a7H_O] . $dn64C[$dKGF5]; } else { if ($GlTLE[strlen($GlTLE) - 1] !== $qoWbD[0]) { $GlTLE .= $qoWbD[$a7H_O]; } } } goto SYXr1; DxKtb: if ($M5tgr == 0) { return $qoWbD[0]; } goto Aj0jE; Q35tq: return $GlTLE; goto h_HbY; SYXr1: if ($jLnS0 > 1 && $MU6Q_[0] == 1 && $GlTLE[0] == $qoWbD[1]) { $GlTLE = substr($GlTLE, 1); } goto Q35tq; M0PXi: $jLnS0 = strlen($MU6Q_); goto x3e2E; Aj0jE: $MU6Q_ = strval($M5tgr); goto M0PXi; p33c0: $dn64C = array('', '十', '百', '千', '万', '亿'); goto DxKtb; BXV2d: $qoWbD = array('零', '一', '二', '三', '四', '五', '六', '七', '八', '九'); goto p33c0; x3e2E: $GlTLE = ''; goto I0yGA; h_HbY: } }