[wp-trac] [WordPress Trac] #59649: PHP 8.0: improvements to allow for named parameters in 6.8
WordPress Trac
noreply at wordpress.org
Sun Jan 5 13:40:58 UTC 2025
#59649: PHP 8.0: improvements to allow for named parameters in 6.8
----------------------------+--------------------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.8
Component: General | Version:
Severity: normal | Resolution:
Keywords: php80 | Focuses: php-compatibility
----------------------------+--------------------------------
Comment (by albatross10):
Hello @hellofromTonya
I need a little clarification for
Task 3: Review all uses of call_user_func_array()
Do we need to implement the array_values function before each
call_user_func_array() in the case where it is not clear about the
argument being a numeric indexed array?
Example: call_user_func_array( 'test_function', $options );
In this case, we can assume that the $options is a numeric indexed array
but it can also be a string one. So if we do use array_values, passing the
key names as parameter names will also not matter. So in this case, it
seems we would have to add a condition check for param names if the
function does support it. Otherwise use array_values before it
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59649#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list