Skip to content

Fix GH-22214: Honor opcache.dups_fix for duplicate functions - #23625

Open
prateekbhujel wants to merge 1 commit into
php:PHP-8.4from
prateekbhujel:prateek/gh22214-opcache-dups-fix-functions
Open

Fix GH-22214: Honor opcache.dups_fix for duplicate functions#23625
prateekbhujel wants to merge 1 commit into
php:PHP-8.4from
prateekbhujel:prateek/gh22214-opcache-dups-fix-functions

Conversation

@prateekbhujel

Copy link
Copy Markdown
Contributor

Closes GH-22214.

opcache.dups_fix was checked when copying the class table in _zend_accel_class_hash_copy, but _zend_accel_function_hash_copy unconditionally raised a fatal error on duplicate functions without checking ignore_dups.

This adds the missing check in _zend_accel_function_hash_copy to ignore duplicate functions when opcache.dups_fix is enabled, keeping the first definition.

@LamentXU123

Copy link
Copy Markdown
Member

As a bug fix to behavior existing since 8.4, plz target 8.4 instead.

Check ignore_dups in _zend_accel_function_hash_copy before raising
a redeclaration error, matching the existing behavior for classes.
@prateekbhujel
prateekbhujel force-pushed the prateek/gh22214-opcache-dups-fix-functions branch from 9887050 to 5c0f515 Compare September 9, 2026 09:16
@prateekbhujel
prateekbhujel changed the base branch from master to PHP-8.4 September 9, 2026 09:16
@prateekbhujel

Copy link
Copy Markdown
Contributor Author

Rebased onto PHP-8.4 and retargeted the PR.

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.

opcache.dups_fix is honored for duplicate classes but not duplicate functions

2 participants