fix(php): 修复函数定义中的arginfo引用格式

- 移除了arginfo引用中不必要的<?=语法
- 统一了arginfo命名格式为直接使用zifName变量
- 确保命名空间函数的arginfo引用格式与其他函数保持一致
pull/1/head
韩天峰 4 months ago
parent 489020d5a3
commit 00a8ea180b
  1. 2
      src/Php/Translator.php

@ -457,7 +457,7 @@ CODE;
$fullName = $functionDef->getNamespacedName();
$zifName = $this->escapeZendFnName($fullName);
if ($functionDef->namespace) {
$code .= $this->getIndent() . 'ZEND_NAMED_FE("' . $this->escapeString($fullName) . '", ZEND_FN(' . $zifName . '), arginfo_<?=' . $zifName . ')' . PHP_EOL;
$code .= $this->getIndent() . 'ZEND_NAMED_FE("' . $this->escapeString($fullName) . '", ZEND_FN(' . $zifName . '), arginfo_' . $zifName . ')' . PHP_EOL;
} else {
$code .= $this->getIndent() . 'ZEND_FE(' . $zifName . ', arginfo_' . $zifName . ')' . PHP_EOL;
}

Loading…
Cancel
Save