<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class CodeUtil { public static function phpRemoveComments($jF50s) { goto j0ViK; T5TSi: if (defined('T_DOC_COMMENT')) { $R9q2E[] = T_DOC_COMMENT; } goto nQC6j; nQC6j: if (defined('T_ML_COMMENT')) { $R9q2E[] = T_ML_COMMENT; } goto pIF90; EUb6_: $iBrnl = false; goto hk5AJ; cXyHO: return join('', $JP2hR); goto xZHIr; Nrmkz: $QWBVn = token_get_all($jF50s); goto EUb6_; pIF90: $JP2hR = array(); goto Nrmkz; hk5AJ: foreach ($QWBVn as $kRdVK) { if (is_array($kRdVK)) { if (in_array($kRdVK[0], $R9q2E)) { continue; } $kRdVK = $kRdVK[1]; } $JP2hR[] = $kRdVK; } goto cXyHO; j0ViK: $R9q2E = array(T_COMMENT); goto T5TSi; xZHIr: } public static function phpVarExport($QNf23, $qGCgk = '') { switch (gettype($QNf23)) { case 'string': if (strpos($QNf23, ':RAW:') === 0) { return substr($QNf23, strlen(':RAW:')); } return '"' . addcslashes($QNf23, '\\$"
	') . '"'; case 'array': goto aOM3f; u2rhV: $yGFxf = array(); goto ty9lP; ty9lP: foreach ($QNf23 as $m1RYi => $tzAUI) { $yGFxf[] = "{$qGCgk}    " . ($Li98M ? '' : self::phpVarExport($m1RYi) . ' => ') . self::phpVarExport($tzAUI, "{$qGCgk}    "); } goto vXt26; vXt26: return '[
' . implode(',
', $yGFxf) . '
' . $qGCgk . ']'; goto uswu9; aOM3f: $Li98M = array_keys($QNf23) === range(0, count($QNf23) - 1); goto u2rhV; uswu9: case 'boolean': return $QNf23 ? 'true' : 'false'; default: return var_export($QNf23, true); } } public static function phpVarExportReturnFile($QNf23) { $xMSF0 = self::phpVarExport($QNf23); return "<?php\nreturn {$xMSF0};"; } }