Commit cb64c169174 for php.net
commit cb64c16917426a305d1d76a0dc36886b1201d536
Author: Tim Düsterhus <tim@bastelstu.be>
Date: Sun Jun 21 23:51:32 2026 +0200
zend_ast: Remove duplicated code when exporting arrays (#22392)
Following php/php-src#22350.
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index 57faedc06f9..cb27d9b7459 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -1940,11 +1940,10 @@ static ZEND_COLD void zend_ast_export_zval(smart_str *str, const zval *zv, int p
}
if (key) {
zend_ast_export_quoted_str(str, key);
- smart_str_appends(str, " => ");
} else {
smart_str_append_long(str, idx);
- smart_str_appends(str, " => ");
}
+ smart_str_appends(str, " => ");
zend_ast_export_zval(str, val, 0, indent);
} ZEND_HASH_FOREACH_END();
smart_str_appendc(str, ']');