From d91362c0320d1511f272a7cc26153177e71c52b1 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Tue, 3 Feb 2026 19:28:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Php):=20=E7=AE=80=E5=8C=96=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=BC=95=E7=94=A8=E6=96=B9=E6=B3=95=E5=B9=B6=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 getPropertyReference 方法调用替换为 attrRef 方法 - 移除全局作用域中的实例化和调用代码 - 将测试代码封装到 main 函数中 - 保持原有的全排列算法功能不变 --- 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 9aff5dd9..45df4451 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -1833,7 +1833,7 @@ class CompilerBase extends \PhpAot\Core\Translator } elseif ($this->isPropertyFetch($arg->value)) { if ($funcName and Reflection::isReferenceArg($funcName, $i)) { $obj = $this->parseIdentifier($arg->value->var); - $list_args[] = $obj . '.getPropertyReference(' . $this->identifierToStr($arg->value->name) . ')'; + $list_args[] = $obj . '.attrRef(' . $this->identifierToStr($arg->value->name) . ')'; continue; } }