<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class FormatUtil { public static function telephone($QS1Aq) { goto UVQW0; Cauov: $QS1Aq = trim($QS1Aq); goto J8oZT; UVQW0: $QS1Aq = str_replace(array('+86', '+', ' ', '(', ')', '-', '（', '）', '', ' ', '　', '"', ';', '	'), '', $QS1Aq); goto Cauov; J8oZT: if (!preg_match('/^[0-9]{3,20}$/', $QS1Aq)) { return null; } goto FwfzE; FwfzE: return $QS1Aq; goto C24px; C24px: } public static function isPhone($EAJpf) { return preg_match('/^1[0-9]{10}$/', $EAJpf); } public static function isUUID($Z4NSz) { return preg_match('/^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/', $Z4NSz); } public static function isUrl($BV17G) { return preg_match('/^(http|https):\\/\\//', $BV17G); } public static function isEmail($TBOzo) { return preg_match('/^[a-zA-Z0-9_\\-\\.]+@[a-zA-Z0-9_\\-]+[\\.a-zA-Z0-9_\\-]+$/ ', $TBOzo); } public static function isDomain($ET_kG) { return preg_match('/([a-z0-9]([a-z0-9\\-]{0,61}[a-z0-9])?\\.)+[a-z]{2,10}/i', $ET_kG); } public static function isMoney($yQd9p) { goto tKnfe; sOk_N: return true; goto PqI_1; ut4xG: if ($yQd9p > 10000 * 100) { return false; } goto sOk_N; tKnfe: if ($yQd9p < 0.01) { return false; } goto ut4xG; PqI_1: } }