Commit graph

1 commit

Author SHA1 Message Date
Gina Peter Banyard
d6cc31cf95
ext/pcre: Refactor preg_replace_callback(_array)() to not pass a useless FCI (#17365)
* ext/pcre: Refactor php_pcre_replace_func_impl() to not rely on an FCI

* ext/pcre: Refactor populate_subpat_array() to take subject as a HashTable*

This makes the assumption the zval is always an array explicit

* ext/pcre: Refactor php_pcre_replace_func_impl()

We don't need the FCI any more, and we always have the subject as a zend_string.

* ext/pcre: Refactor php_pcre_replace_func()

We don't need the FCI any more

* ext/pcre: Refactor php_replace_in_subject_func()

We don't need the FCI any more
Make the Hashtable param const
Throw exception on non string entries

* ext/pcre: Refactor preg_replace_func_impl()

We don't need the FCI anymore
Make the Hashtable params const
Rename function to indicate it is a PHP pcre function

* ext/pcre: Add trampoline tests for preg_replace_callback(_array)()

* ext/pcre: Handle trampolines properly for preg_replace_callback(_array)()

* Revert FCI passing removal
2025-01-08 18:05:06 +00:00