Repository navigation
Stdlib: abs/floor/ceil Reflection/named param num (#23259) - #25531
Merged
Merged
Conversation
Map Zend stub name num in BuiltinParamNames so abs(num:), floor(num:), and ceil(num:) match php-src instead of InternalArgInfo's number. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the AOT fixture on int abs only — floor/ceil and float abs already miscompile under AOT on master (positional returns 0). Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
abs/floor/ceilto Zend stub paramnuminBuiltinParamNames(php-srcext/standard/basic_functions.stub.php); InternalArgInfo still advertisednumber.abs(num: …)/floor(num: …)/ceil(num: …)work; legacynumber:is rejected.Closes #23259
Test plan
php bin/vm.php test/repro/issue_23259_abs_floor_ceil_named.php→okvendor/bin/phpunit --filter testAbsFloorCeilZendStubNamedParams→ OKvendor/bin/phpunit --filter named_args_abs_floor_ceil test/compliance/→ OK (6)php bin/compile.php -o /tmp/x test/repro/issue_23259_abs_floor_ceil_named_aot.php && /tmp/x→3\n3vendor/bin/phpunit --filter abs_floor_ceil_named_params test/aot/→ OKNot covered: floor/ceil (and float
abs) under AOT already return0on master for positional calls — out of scope for this Reflection/named-arg fix.Verification transcript
Made with Cursor