<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class IdUtil { public static function generate($eBCLS = 'Default') { goto jcDa2; IboG1: return $eBCLS . '_' . $WOJ4L[$eBCLS]; goto hL8oH; BrM9J: $WOJ4L[$eBCLS]++; goto IboG1; jcDa2: static $WOJ4L = array(); goto QND5b; QND5b: if (empty($WOJ4L[$eBCLS])) { $WOJ4L[$eBCLS] = 0; } goto BrM9J; hL8oH: } public static function next64BitId() { return intval(microtime(true) * 10000) . getmypid() % 10 . sprintf('%04d', rand(0, 9999)); } public static function next64BitIdSeq($Byg7_ = null) { goto wZbKM; wZbKM: static $o7vlB = null; goto jle5k; P2cwu: static $ZdfJA = null; goto JZMMd; ZNRy6: $o7vlB = $emspg; goto U3GPZ; jOGVL: return $emspg . $KesbZ . $ZdfJA . sprintf('%03d', $E1dSm++); goto cXvH2; JZMMd: do { $emspg = intval(microtime(true) * 10000); if ($emspg !== $o7vlB) { $E1dSm = 0; } } while ($E1dSm >= 1000); goto ZNRy6; lJUVS: $KesbZ = $Byg7_ % 10; goto WQ1fQ; U3GPZ: if ($Byg7_ === null) { $Byg7_ = getmypid(); } goto lJUVS; jle5k: static $E1dSm = 0; goto P2cwu; WQ1fQ: if (null === $ZdfJA) { $ZdfJA = rand(0, 9); } goto jOGVL; cXvH2: } public static function generateSN() { return date('YmdHis', time()) . sprintf('%05d', rand(0, 99999)); } }