<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Env; class EnvUtil { public static function parse($RLMU5) { goto iX9WX; KN0mo: if (file_exists($RLMU5)) { foreach (explode('
', file_get_contents($RLMU5)) as $w7pZV) { if ($w7pZV = trim($w7pZV)) { goto Nko3o; xbbOu: $GBNIv = trim($kaMU7[0]); goto u5kdt; ooC6B: $VFelt = trim(join('=', $kaMU7)); goto Ix9Ha; ijsDx: $cBKip[$GBNIv] = $VFelt; goto pHi6f; XzHqa: $kaMU7 = explode('=', $w7pZV); goto xbbOu; Nko3o: if (substr($w7pZV, 0, 1) === '#') { continue; } goto XzHqa; Ix9Ha: switch (strtolower($VFelt)) { case 'true': case '(true)': $VFelt = true; break; case 'false': case '(false)': $VFelt = false; break; case 'empty': case '(empty)': $VFelt = ''; break; case 'null': case '(null)': $VFelt = null; break; } goto ijsDx; u5kdt: array_shift($kaMU7); goto ooC6B; pHi6f: } } } goto Z0h7j; Z0h7j: return $cBKip; goto nPKjM; iX9WX: $cBKip = array(); goto KN0mo; nPKjM: } public static function all($RLMU5 = null) { goto vpio1; vpio1: global $mKo8t; goto H2mgW; KIOVV: if (null === $RLMU5) { $RLMU5 = base_path('.env'); } goto CsRxC; CsRxC: return self::parse($RLMU5); goto wpmEh; H2mgW: if (!empty($mKo8t)) { return $mKo8t; } goto KIOVV; wpmEh: } }