Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.4.29

- Core:
. Fixed AST printing of interface extends list as implements. (Jorg Sowa)

- Curl:
. Fixed curl_reset() retaining CURLOPT_PRIVATE after reset. (lacatoire)

Expand Down
22 changes: 22 additions & 0 deletions Zend/tests/assert/expect_interface_extends.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--TEST--
AST printing of interface extends list
--INI--
zend.assertions=1
--FILE--
<?php

try {
assert(false && function () {
interface I extends A, B {}
});
} catch (AssertionError $e) {
echo $e->getMessage(), "\n";
}

?>
--EXPECT--
assert(false && function () {
interface I extends A, B {
}

@jorgsowa jorgsowa Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is weird whitespace, but honestly I don't care so much about whitespaces. It's unrelated to the fix.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same whitespace problem occurs in many other places as well. It doesn't really matter a whole lot and is indeed unrelated.

})
2 changes: 1 addition & 1 deletion Zend/zend_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ static ZEND_COLD void zend_ast_export_class_no_header(smart_str *str, zend_ast_d
zend_ast_export_ns_name(str, decl->child[0], 0, indent);
}
if (decl->child[1]) {
smart_str_appends(str, " implements ");
smart_str_appends(str, (decl->flags & ZEND_ACC_INTERFACE) ? " extends " : " implements ");
zend_ast_export_ex(str, decl->child[1], 0, indent);
}
smart_str_appends(str, " {\n");
Expand Down
Loading