<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class PlatformUtil { const WINDOWS = 'windows'; const LINUX = 'linux'; const OSX = 'osx'; const UNKNOWN = 'unknown'; private static function name() { return strtoupper(PHP_OS); } public static function isWindows() { return substr(self::name(), 0, 3) == 'WIN'; } public static function isOsx() { return self::name() == 'DARWIN'; } public static function isLinux() { return self::name() == 'LINUX'; } public static function isType($gQM0b) { return in_array(self::type(), $gQM0b); } public static function type() { goto yhZ0T; yhZ0T: if (self::isOsx()) { return self::OSX; } goto pA8kQ; pSe2A: if (self::isLinux()) { return self::LINUX; } goto tjjJL; pA8kQ: if (self::isWindows()) { return self::WINDOWS; } goto pSe2A; tjjJL: return self::UNKNOWN; goto fM9yv; fM9yv: } }