Skip to content

Conversation

@khaledalam
Copy link

Description

zend_error_noreturn() never returns (marked with ZEND_NORETURN), so any code following it is dead code that can never be executed.

@khaledalam khaledalam requested a review from dstogov as a code owner January 20, 2026 12:20
@khaledalam khaledalam changed the title feat: Remove unreachable code after zend_error_noreturn calls. Remove unreachable code after zend_error_noreturn calls. Jan 20, 2026
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

No strong opinion, some compilers do not understand ZEND_NORETURN and thus may fail with strange errors in some cases. Also, you missed a few similar instances. This regex may help. zend_error_noreturn\([^)]*\);\n\s*[^}\s]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants