Skip to content

Convert remaining zend_parse_parameters_none() to fast ZPP#21343

Merged
alexandre-daubois merged 1 commit intophp:masterfrom
alexandre-daubois:zpp-final-round
Mar 16, 2026
Merged

Convert remaining zend_parse_parameters_none() to fast ZPP#21343
alexandre-daubois merged 1 commit intophp:masterfrom
alexandre-daubois:zpp-final-round

Conversation

@alexandre-daubois
Copy link
Copy Markdown
Member

Final round. There are 2 remaining, but I'm not aware of a way to update them (because they goto or return NULL explicitly)

@alexandre-daubois alexandre-daubois changed the title Convert remaining zend_parse_parameters_none() to ZPP Convert remaining zend_parse_parameters_none() to fast ZPP Mar 4, 2026
@TimWolla
Copy link
Copy Markdown
Member

TimWolla commented Mar 4, 2026

There are 2 remaining, but I'm not aware of a way to update them (because they goto or return NULL explicitly)

Do you have a link for reference?

@alexandre-daubois
Copy link
Copy Markdown
Member Author

Of course, here they are:

php-src/ext/spl/spl_array.c

Lines 1227 to 1229 in 11a9574

if (zend_parse_parameters_none() == FAILURE) {
goto exit;
}

if (zend_parse_parameters_none() == FAILURE) {
return NULL;
}

@Girgias
Copy link
Copy Markdown
Member

Girgias commented Mar 5, 2026

Submitted #21349 for the one in spl_array.c.

@alexandre-daubois
Copy link
Copy Markdown
Member Author

Thanks Gina! Should something similar be done for the iterators? It would require to refactor the switch in spl_dual_it_construct(), and ultimately use fast ZPP for the different cases (or at least lay the groundwork if we'd like to convert them in the future)

@Girgias
Copy link
Copy Markdown
Member

Girgias commented Mar 6, 2026

Thanks Gina! Should something similar be done for the iterators? It would require to refactor the switch in spl_dual_it_construct(), and ultimately use fast ZPP for the different cases (or at least lay the groundwork if we'd like to convert them in the future)

Meh, it might make sense to extract them because there is little common ground, extracting the AppendIterator constructor was easy: #21367

@alexandre-daubois alexandre-daubois merged commit a8543df into php:master Mar 16, 2026
19 checks passed
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.

6 participants