<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Env; class EnvUtil { public static function parse($sCmIC) { goto Xkf0H; VmtBp: if (file_exists($sCmIC)) { foreach (explode('
', file_get_contents($sCmIC)) as $Y7qh9) { if ($Y7qh9 = trim($Y7qh9)) { goto LP7db; Igcjf: switch (strtolower($pk5fc)) { case 'true': case '(true)': $pk5fc = true; break; case 'false': case '(false)': $pk5fc = false; break; case 'empty': case '(empty)': $pk5fc = ''; break; case 'null': case '(null)': $pk5fc = null; break; } goto Yx2v3; LP7db: if (substr($Y7qh9, 0, 1) === '#') { continue; } goto kULoz; kULoz: $KHn4u = explode('=', $Y7qh9); goto xqagA; ZD8wz: $pk5fc = trim(join('=', $KHn4u)); goto Igcjf; Yx2v3: $WjSDx[$Fkd1C] = $pk5fc; goto S6oRX; xqagA: $Fkd1C = trim($KHn4u[0]); goto PJzVG; PJzVG: array_shift($KHn4u); goto ZD8wz; S6oRX: } } } goto ZAuvK; ZAuvK: return $WjSDx; goto NF19t; Xkf0H: $WjSDx = array(); goto VmtBp; NF19t: } public static function all($sCmIC = null) { goto gZB82; gZB82: global $g2UcI; goto fXVsM; aGhuK: return self::parse($sCmIC); goto jUAs4; xVkPE: if (null === $sCmIC) { $sCmIC = base_path('.env'); } goto aGhuK; fXVsM: if (!empty($g2UcI)) { return $g2UcI; } goto xVkPE; jUAs4: } }