From 2481eebd0cf3540bd3f9db51659395fcf43add6c Mon Sep 17 00:00:00 2001 From: rango Date: Thu, 30 Apr 2026 10:31:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(php):=20=E4=BF=AE=E6=AD=A3=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E7=B1=BB=E5=9E=8B=E5=90=8E=E7=BC=80=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了在不同操作系统下整数类型后缀的判断逻辑 - 将原来的 isMacos 判断改为 isLinux 判断 - 确保在 Linux 系统下使用 'L' 后缀,在其他系统使用 'LL' 后缀 --- src/Php/CompilerBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index bdd4238f..9e3e227b 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -1048,7 +1048,7 @@ class CompilerBase extends \PhpAot\Core\Translator $type = $expr->getType(); switch ($type) { case 'Scalar_Int': - return $expr->value . ($this->isMacos() ? 'LL' : 'L'); + return $expr->value . ($this->isLinux() ? 'L' : 'LL'); case 'Scalar_Float': return $this->parseScalarFloat($expr); case 'Scalar_String':