Skip to content

asort()/arsort(): zend_sort + zend_compare - #37727

Merged
PurHur merged 1 commit into
masterfrom
claude/asort-zend
Oct 24, 2026
Merged

PurHur merged 1 commit into
masterfrom
claude/asort-zend

Conversation

@PurHur

@PurHur PurHur commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Bubble sort → exact zend_sort with zend_compare (floats no longer truncated). Gate: AOT differential sweep failing set identical to master.

🤖 Generated with Claude Code

Bubble sort (n² pass cap) comparing every non-string value with readLong —
floats were truncated, so 1.5 and 1.2 compared equal. Now ZendSortLlvm over
the exported [key, value] pairs with php_array_data_compare semantics
(ZendCompareLlvm; SORT_FLAG_CASE keeps strcasecmp on string pairs), negated
for arsort, stable tiebreak.

Output for keyed arrays is still limited by the pre-existing pair write-back
(int keys stringified, mixed key kinds) — the hashtable has no ordered
representation across key kinds; tracked separately.

Gates: AOT differential sweep failing set identical to master (379 ok / 8 fail).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PurHur
PurHur merged commit 28b8bc4 into master Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant