Skip to content

ext/exif: Replace zend_parse_parameters() with ZEND_PARSE_PARAMETERS macros#21126

Open
arshidkv12 wants to merge 3 commits intophp:masterfrom
arshidkv12:exif
Open

ext/exif: Replace zend_parse_parameters() with ZEND_PARSE_PARAMETERS macros#21126
arshidkv12 wants to merge 3 commits intophp:masterfrom
arshidkv12:exif

Conversation

@arshidkv12
Copy link
Contributor

This replaces zend_parse_parameters() with the ZEND_PARSE_PARAMETERS_START/END macros, which provide
exception-aware parameter parsing and align the code with modern php-src conventions.

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

If this is done, it should be consistently done for exif_imagetype() as well.

@arshidkv12 arshidkv12 requested a review from TimWolla February 4, 2026 09:52
@Girgias
Copy link
Member

Girgias commented Feb 4, 2026

This replaces zend_parse_parameters() with the ZEND_PARSE_PARAMETERS_START/END macros, which provide exception-aware parameter parsing and align the code with modern php-src conventions.

zend_parse_parameters() is also exception aware. And it is not really a modern convention, Fast ZPP got introduced to reduce the overhead of calling ZPP for hot/short functions. Fast ZPP introduces some code bloat into every function, although @ndossche knows more the details about this.

So I'm not sure whether that's really a good motivation here.

@arshidkv12
Copy link
Contributor Author

arshidkv12 commented Feb 4, 2026

I think fast ZPP is indirectly more secure, because null-safety is part of it.

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.

3 participants