fix(php): 修正整数类型后缀逻辑判断

- 修复了在不同操作系统下整数类型后缀的判断逻辑
- 将原来的 isMacos 判断改为 isLinux 判断
- 确保在 Linux 系统下使用 'L' 后缀,在其他系统使用 'LL' 后缀
pull/1/head
韩天峰 4 months ago
parent f266e6ec62
commit 2481eebd0c
  1. 2
      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':

Loading…
Cancel
Save