Stdlib: drop phantom array_first_key()/array_last_key() (#22793) - #22830
Merged
Conversation
php-src never ships these (only array_key_first/last; PHP 8.5 array_first/last are values). Remove registration so all profiles match Zend function_exists. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 24, 2026
PurHur
added a commit
that referenced
this pull request
Jul 24, 2026
…2838) #22830 wrote lowering_source_fingerprint 73d4dfb3… while live source on the same tree hashes to 6998141b… (all 6730 fingerprint paths match HEAD), which redded north-star5-verify-fast step 4f-m and user_release_ready. Restamp only; honest verified-fresh rebuild 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
array_first_key()/array_last_key()— Zend/php-src never ships them (array_key_first/array_key_lastsince 7.3; PHP 8.5array_first/array_lastare values only).CompilerVersion::supportsPhp83ArrayKeyFunctions(), Module registration, spine requires, and positive compliance/AOT fixtures; keep phantom guards on default +PROFILE=8.4.php-src reference:
ext/standard/array.c— noarray_first_key/array_last_key.PHP change: delete
ext/standard/array_{first,last}_key.php; unregister inext/standard/Module.php.Closes #22793
Test plan
array_first_key=0,array_last_key=0,array_key_first=1;array_first=1only on 8.5vendor/bin/phpunit --filter array_first_last_key→ OK (6)vendor/bin/phpunit --filter array_first_last_key test/aot/AotTest.php→ OK (2)php script/bootstrap-inventory.php --check→ OK 6511/6511make north-star5-verify-fast→ OK after fingerprint restamp./script/check-generated-docs.sh→ OKPre-work gates:
release-readiness --json→user_release_ready: yesMade with Cursor