Proposal: Rename FFI getFuncArg*
to getFuncParameter*
, $arg_index->$index
#7236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHP is already already using "Parameter" instead of "Argument" for reflection on types elsewhere.
Parameter is used to refer to the function declarations
(AST_PARAM internally in the AST, ReflectionFunctionAbstract->getParameters(),
etc.)
Argument is used to refer to expressions passed to the functions by the caller
(ArgumentCountError, etc.).
(Error messages were also changed in php 8.x to refer to passing too many arguments to a
function)
Other languages use similar definitions,
e.g. https://developer.mozilla.org/en-US/docs/Glossary/Parameter
Followup to #7217 (review)
Looking at this again, I don't see a need to drop the "Func" - there's already getFuncABI.
If you look at the current implementation, there's getStruct*, getArray*, getPointer*, meaning
getFunc*
sort of makes sense for a naming scheme to make it easier to find functionality associated with a given function.