-
Notifications
You must be signed in to change notification settings - Fork 8k
Zend: Remove zend_fcall_info_args_ex() #17652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The last usage within php-src was within PDO but this is no longer the case since 3ff7758 Moreover, external usage is very limited and the two usages I could find have been removed. [1][2] [1] zephir-lang/zephir@82a8d05 [2] krakjoe/uopz@b1015ae
174ec4d to
c5ac76a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything bad in keeping this API.
May be some third party extensions use it.
|
Maybe deprecate in 8.5 and remove in 8.6? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider this an approval in concept.
| . The zend_fcall_info_args_ex() API has been removed. | ||
| This is because it does not follow the usual CUFA semantics and it | ||
| automatically wraps by-value arguments into references for by-ref | ||
| parameters. | ||
| It is recommended to set the FCI named_params instead, | ||
| however zend_fcall_info_args() can also be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a little more actionable description of what to do when previously passing a non-NULL func for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is none, because the semantics exposed are non-standard and cannot be mimicked in userland. It effectively does the same as the @prefer-ref $array annotation we have in core that allows to pass values to by-reference arguments. Something that I've been told we should not expand on, as that was the main pushback against https://wiki.php.net/rfc/array-sort-return-array
This is basically not a C developer issue, but a PHP userland one where the end-user doesn't pass a variable.
The last usage within php-src was within PDO but this is no longer the case since 3ff7758 Moreover, external usage is very limited and the two usages I could find have been removed. [1][2]
[1] zephir-lang/zephir@82a8d05
[2] krakjoe/uopz@b1015ae