Language: numeric-string <=> via zendi_smart_strcmp (#22848)#22864
Merged
Conversation
String↔string spaceship and ordered compares used lexicographic strcmp; match Zend when both operands are_numeric (php-src-strict). Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
Verification (this run)Trust probe (before claim): inventory OK 6512/6512; VM ( JIT ( PHPUnit: AOT: native literal path shares |
This was referenced Jul 24, 2026
PurHur
added a commit
that referenced
this pull request
Jul 24, 2026
…22866) Post-#22847 merges (#22857/#22862/#22863/#22864/#22865) moved live lowering_source_fingerprint to 9aee9361… while the committed stamp stayed at 159f4081…, redding north-star5-verify-fast step 4f-m and user_release_ready. Restamp only; honest verified-fresh remains on #22642/#22717. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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
<=>(and ordered</>on the VM) used lexicographicstrcmp; Zend useszendi_smart_strcmpso both-is_numericoperands compare as numbers ("10"<=>"2" === 1).CompareJitHelperScalars::stringSpaceship(NestedJIT /__value__spaceship); VMVariable::spaceshipOp/ string relational; native JITVmStringCompare::smartStrcmp.Closes #22848
php-src reference
Zend/zend_operators.c—zendi_smart_strcmp/is_numeric_string_exTest plan
php bin/vm.php test/repro/issue_22848_numeric_spaceship.phpmatches Zendvendor/bin/phpunit --filter SpaceshipCompareJitHelperTestPHP_COMPILER_HELPER_RUNTIME_O=1(lock contended — will paste)spaceship_numeric_string.phptVerification (VM)
Made with Cursor