错误: 保持格式的打印机在重新打印包含 `\\\` 的修改后的字符串节点时,会添加额外的反斜杠
作者: maks-rafalko创建于 2026年3月22日更新于 2026年3月22日
traverse($originalStatements);
// Find the String_ node in the clone and change its value to simulate
// PregMatchRemoveFlags removing the 'U' flag: '/…/iU' → '/…/i'.
$stringNode = (new NodeFinder())->findFirstInstanceOf(
$clonedStatements,
…
内容来源: nikic/PHP-Parser