<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class VersionUtil { public static function match($nwI19, $jXgMD) { goto QwYs4; OZV6t: $IxWlH = '=='; goto FAFQM; lqc23: return version_compare($nwI19, $jXgMD, $IxWlH); goto U6IOR; saIu0: $KyVCH = array('>=', '<=', '==', '>', '<'); goto OZV6t; QwYs4: if ('*' == $jXgMD) { return true; } goto saIu0; FAFQM: foreach ($KyVCH as $ZpLX1) { if (starts_with($jXgMD, $ZpLX1)) { goto WRWEK; WRWEK: $IxWlH = $ZpLX1; goto htKH6; htKH6: $jXgMD = substr($jXgMD, strlen($ZpLX1)); goto WWsad; WWsad: break; goto BjdUM; BjdUM: } } goto lqc23; U6IOR: } public static function parse($da1xd) { goto UwOF1; kviH6: return array($yQ4Wg[0], $yQ4Wg[1]); goto JGXdX; PcXss: if (count($yQ4Wg) == 1) { return array($yQ4Wg[0], '*'); } goto kviH6; UwOF1: $yQ4Wg = explode(':', $da1xd); goto PcXss; JGXdX: } public static function isVersion($H1gTe) { return preg_match('/^\\d+\\.\\d+\\.\\d+$/i', $H1gTe) || preg_match('/^\\d+\\.\\d+\\.\\d+\\-(alpha|beta|release)$/i', $H1gTe) || preg_match('/^\\d+\\.\\d+\\.\\d+\\-(alpha|beta|release)\\-\\d+$/i', $H1gTe); } }