René's URL Explorer Experiment


Title: Infer non-empty-array after array_key_first/last() by staabm · Pull Request #4536 · phpstan/phpstan-src · GitHub

Open Graph Title: Infer non-empty-array after array_key_first/last() by staabm · Pull Request #4536 · phpstan/phpstan-src

X Title: Infer non-empty-array after array_key_first/last() by staabm · Pull Request #4536 · phpstan/phpstan-src

Description: PHPStan's source code. This is where development happens. Check https://github.com/phpstan/phpstan for the distribution repository. - Infer non-empty-array after array_key_first/last() by staabm · Pull Request #4536 · phpstan/phpstan-src

Open Graph Description: closes phpstan/phpstan#13546

X Description: closes phpstan/phpstan#13546

Opengraph URL: https://github.com/phpstan/phpstan-src/pull/4536

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:e91fbd1f-da93-a294-1ea6-8a1fa597436d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBFE6:D1C6A:71D298:984FB3:6B00AED2
html-safe-nonceb48b318ff95b3f5bb8bef1bb637763839d29b95686754aac50d5fedca2e99d72
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkU2OkQxQzZBOjcxRDI5ODo5ODRGQjM6NkIwMEFFRDIiLCJ2aXNpdG9yX2lkIjoiNTI4MDc1NDMyNDc4NjQyNTU1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1d63f27d0338ac0ec5094ed741a0fb4c3a7d02af173a5913f7bf135630726db0
hovercard-subject-tagpull_request:2991223194
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/phpstan/phpstan-src/4536/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/e66d02183028666c881cf41f4f951ce0448d3ada96fca9fb9ad86e9d9d2ab75f/phpstan/phpstan-src/pull/4536
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e66d02183028666c881cf41f4f951ce0448d3ada96fca9fb9ad86e9d9d2ab75f/phpstan/phpstan-src/pull/4536
og:image:altcloses phpstan/phpstan#13546
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamestaabm
hostnamegithub.com
expected-hostnamegithub.com
Nonec0dd5f5d6f515a591019ecd66df2c4eab3379c2d3b0777568a90d8c7ae10b79e
turbo-cache-controlno-cache
go-importgithub.com/phpstan/phpstan-src git https://github.com/phpstan/phpstan-src.git
octolytics-dimension-user_id16435710
octolytics-dimension-user_loginphpstan
octolytics-dimension-repository_id219334214
octolytics-dimension-repository_nwophpstan/phpstan-src
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id219334214
octolytics-dimension-repository_network_root_nwophpstan/phpstan-src
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release729d8cda69b3d267995675dfbf89ff27ccf61bf6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/phpstan/phpstan-src/pull/4536#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F4536
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F4536
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=phpstan%2Fphpstan-src
Reloadhttps://github.com/phpstan/phpstan-src/pull/4536
Reloadhttps://github.com/phpstan/phpstan-src/pull/4536
Reloadhttps://github.com/phpstan/phpstan-src/pull/4536
phpstanhttps://github.com/phpstan
phpstan-srchttps://github.com/phpstan/phpstan-src
Codehttps://github.com/phpstan/phpstan-src
Pull requests185 (185)https://github.com/phpstan/phpstan-src/pulls
Actionshttps://github.com/phpstan/phpstan-src/actions
Security and qualityhttps://github.com/phpstan/phpstan-src/security
Insightshttps://github.com/phpstan/phpstan-src/insights
https://github.com/phpstan/phpstan-src
staabmhttps://github.com/staabm
phpstan:2.1.xhttps://github.com/phpstan/phpstan-src/tree/2.1.x
staabm:Bug13546https://github.com/staabm/phpstan-src/tree/Bug13546
Conversationhttps://github.com/phpstan/phpstan-src/pull/4536
Commits8 (8)https://github.com/phpstan/phpstan-src/pull/4536/commits
Checkshttps://github.com/phpstan/phpstan-src/pull/4536/checks
Files changedhttps://github.com/phpstan/phpstan-src/pull/4536/files
Infer non-empty-array after array_key_first/last()https://github.com/phpstan/phpstan-src/pull/4536#top
staabmhttps://github.com/staabm
phpstan:2.1.xhttps://github.com/phpstan/phpstan-src/tree/2.1.x
staabm:Bug13546https://github.com/staabm/phpstan-src/tree/Bug13546
https://github.com/staabm
staabmhttps://github.com/staabm
Nov 8, 2025https://github.com/phpstan/phpstan-src/pull/4536#issue-3603306376
phpstan/phpstan#13546https://github.com/phpstan/phpstan/issues/13546
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
https://github.com/staabm
staabmhttps://github.com/staabm
November 8, 2025 10:10https://github.com/phpstan/phpstan-src/pull/4536#event-20806539815
https://github.com/phpstan-bot
phpstan-bothttps://github.com/phpstan-bot
Nov 8, 2025https://github.com/phpstan/phpstan-src/pull/4536#issuecomment-3506369426
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
https://github.com/SplotyCode
SplotyCodehttps://github.com/SplotyCode
Nov 8, 2025 https://github.com/phpstan/phpstan-src/pull/4536#pullrequestreview-3438357363
View reviewed changes https://github.com/phpstan/phpstan-src/pull/4536/files
src/Analyser/TypeSpecifier.phphttps://github.com/phpstan/phpstan-src/pull/4536/files#diff-1076e38598f300a69c9dc998dae31374052f95bd69d0d71c11e9d0a4c188976d
SplotyCodehttps://github.com/SplotyCode
Nov 8, 2025https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2506925816
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://phpstan.org/r/3459cc41-b3a9-4f63-9e69-23b7ed76cf3dhttps://phpstan.org/r/3459cc41-b3a9-4f63-9e69-23b7ed76cf3d
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
staabmhttps://github.com/staabm
Nov 8, 2025https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2506954987
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
staabmhttps://github.com/staabm
Feb 10, 2026https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2786313577
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
phpstan/phpstan#14081https://github.com/phpstan/phpstan/issues/14081
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/50d062692226338bd81fe91ffe25ffbc776f57c1..885233d2b427a88ae6a85a689968a4ed639e1f22
50d0626https://github.com/phpstan/phpstan-src/commit/50d062692226338bd81fe91ffe25ffbc776f57c1
885233dhttps://github.com/phpstan/phpstan-src/commit/885233d2b427a88ae6a85a689968a4ed639e1f22
Compare https://github.com/phpstan/phpstan-src/compare/50d062692226338bd81fe91ffe25ffbc776f57c1..885233d2b427a88ae6a85a689968a4ed639e1f22
November 13, 2025 21:04https://github.com/phpstan/phpstan-src/pull/4536#event-20927226206
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/bd15a288346072fa55f62570ad4accb28d0663a4..d909a102be10053c55cecd310c3cd45c3d5ef2a2
bd15a28https://github.com/phpstan/phpstan-src/commit/bd15a288346072fa55f62570ad4accb28d0663a4
d909a10https://github.com/phpstan/phpstan-src/commit/d909a102be10053c55cecd310c3cd45c3d5ef2a2
Compare https://github.com/phpstan/phpstan-src/compare/bd15a288346072fa55f62570ad4accb28d0663a4..d909a102be10053c55cecd310c3cd45c3d5ef2a2
January 27, 2026 09:15https://github.com/phpstan/phpstan-src/pull/4536#event-22311640550
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/d909a102be10053c55cecd310c3cd45c3d5ef2a2..1e9dc76ffecfdbc46c74341307482e3162758b41
d909a10https://github.com/phpstan/phpstan-src/commit/d909a102be10053c55cecd310c3cd45c3d5ef2a2
1e9dc76https://github.com/phpstan/phpstan-src/commit/1e9dc76ffecfdbc46c74341307482e3162758b41
Compare https://github.com/phpstan/phpstan-src/compare/d909a102be10053c55cecd310c3cd45c3d5ef2a2..1e9dc76ffecfdbc46c74341307482e3162758b41
February 8, 2026 19:11https://github.com/phpstan/phpstan-src/pull/4536#event-22626307172
https://github.com/VincentLanglet
VincentLanglethttps://github.com/VincentLanglet
Feb 9, 2026 https://github.com/phpstan/phpstan-src/pull/4536#pullrequestreview-3775429637
View reviewed changes https://github.com/phpstan/phpstan-src/pull/4536/files
src/Analyser/TypeSpecifier.phphttps://github.com/phpstan/phpstan-src/pull/4536/files#diff-1076e38598f300a69c9dc998dae31374052f95bd69d0d71c11e9d0a4c188976d
VincentLanglethttps://github.com/VincentLanglet
Feb 9, 2026https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2784589323
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
staabmhttps://github.com/staabm
Feb 10, 2026https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2786033570
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
phpstan-src/src/Analyser/TypeSpecifier.phphttps://github.com/phpstan/phpstan-src/blob/eb4e247282a61eaa0b15f8139264e09c183622d8/src/Analyser/TypeSpecifier.php#L2258-L2269
eb4e247https://github.com/phpstan/phpstan-src/commit/eb4e247282a61eaa0b15f8139264e09c183622d8
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
src/Analyser/TypeSpecifier.phphttps://github.com/phpstan/phpstan-src/pull/4536/files#diff-1076e38598f300a69c9dc998dae31374052f95bd69d0d71c11e9d0a4c188976d
VincentLanglethttps://github.com/VincentLanglet
Feb 9, 2026https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2784595331
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
staabmhttps://github.com/staabm
Feb 10, 2026https://github.com/phpstan/phpstan-src/pull/4536#discussion_r2786057296
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
staabmhttps://github.com/staabm
February 10, 2026 07:26https://github.com/phpstan/phpstan-src/pull/4536#commits-pushed-0ea52a0
https://github.com/staabm
Infer non-empty-array after array_key_first/last()https://github.com/phpstan/phpstan-src/pull/4536/commits/0ea52a0eff6cf2c0f3b376e4800a56d5ef110e6b
0ea52a0https://github.com/phpstan/phpstan-src/pull/4536/commits/0ea52a0eff6cf2c0f3b376e4800a56d5ef110e6b
https://github.com/staabm
Update bug-13546.phphttps://github.com/phpstan/phpstan-src/pull/4536/commits/d1aece6a5acb21373fd174c4c2769d4d1746339f
d1aece6https://github.com/phpstan/phpstan-src/pull/4536/commits/d1aece6a5acb21373fd174c4c2769d4d1746339f
https://github.com/staabm
add testhttps://github.com/phpstan/phpstan-src/pull/4536/commits/37ea055f46f871454d008d7f37c9b9a6a82ebc52
37ea055https://github.com/phpstan/phpstan-src/pull/4536/commits/37ea055f46f871454d008d7f37c9b9a6a82ebc52
https://github.com/staabm
test maybe nullhttps://github.com/phpstan/phpstan-src/pull/4536/commits/2505ba44b8f00fe725da5f71935f6e83dcb1381f
2505ba4https://github.com/phpstan/phpstan-src/pull/4536/commits/2505ba44b8f00fe725da5f71935f6e83dcb1381f
https://github.com/staabm
fix php 7.4 compathttps://github.com/phpstan/phpstan-src/pull/4536/commits/1427f89df27e00d7b95f34780a637a0f5b3c985c
1427f89https://github.com/phpstan/phpstan-src/pull/4536/commits/1427f89df27e00d7b95f34780a637a0f5b3c985c
https://github.com/staabm
Update bug-13546.phphttps://github.com/phpstan/phpstan-src/pull/4536/commits/7d4c4dcad48f0dd1a56968eedc7fe28b00a184aa
7d4c4dchttps://github.com/phpstan/phpstan-src/pull/4536/commits/7d4c4dcad48f0dd1a56968eedc7fe28b00a184aa
https://github.com/staabm
add testhttps://github.com/phpstan/phpstan-src/pull/4536/commits/c8f2b3b6d689e4af6d50543529f0b406c5f76b96
c8f2b3bhttps://github.com/phpstan/phpstan-src/pull/4536/commits/c8f2b3b6d689e4af6d50543529f0b406c5f76b96
https://github.com/staabm
staabmhttps://github.com/staabm
force-pushedhttps://github.com/phpstan/phpstan-src/compare/1e9dc76ffecfdbc46c74341307482e3162758b41..c8f2b3b6d689e4af6d50543529f0b406c5f76b96
1e9dc76https://github.com/phpstan/phpstan-src/commit/1e9dc76ffecfdbc46c74341307482e3162758b41
c8f2b3bhttps://github.com/phpstan/phpstan-src/commit/c8f2b3b6d689e4af6d50543529f0b406c5f76b96
Compare https://github.com/phpstan/phpstan-src/compare/1e9dc76ffecfdbc46c74341307482e3162758b41..c8f2b3b6d689e4af6d50543529f0b406c5f76b96
February 10, 2026 06:29https://github.com/phpstan/phpstan-src/pull/4536#event-22663975863
https://github.com/staabm
Update TypeSpecifier.phphttps://github.com/phpstan/phpstan-src/pull/4536/commits/3532071f2c3ccd4c371538a504bde6056d1a63ff
3532071https://github.com/phpstan/phpstan-src/pull/4536/commits/3532071f2c3ccd4c371538a504bde6056d1a63ff
https://github.com/staabm
staabmhttps://github.com/staabm
48301e6https://github.com/phpstan/phpstan-src/commit/48301e6788e7ad7df20a45a66af885fa9c0c6126
Feb 10, 2026https://github.com/phpstan/phpstan-src/pull/4536#event-22664326508
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
https://github.com/staabm
staabmhttps://github.com/staabm
February 10, 2026 06:47https://github.com/phpstan/phpstan-src/pull/4536#event-22664327586
https://github.co/hiddenchars
https://github.com/phpstan/phpstan-src/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpstan-src%2Fpull%2F4536
https://github.com/VincentLanglet
VincentLanglet https://github.com/VincentLanglet
https://github.com/phpstan/phpstan-src/pull/4536/files/1e9dc76ffecfdbc46c74341307482e3162758b41
https://github.com/SplotyCode
SplotyCode https://github.com/SplotyCode
https://github.com/phpstan/phpstan-src/pull/4536/files/e4b9e606574d6af38432f42c37bb48d7ae8fa4b9
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
False positive with array_key_first and reportPossiblyNonexistentGeneralArrayOffset https://github.com/phpstan/phpstan/issues/13546
Please reload this pagehttps://github.com/phpstan/phpstan-src/pull/4536
https://github.com/staabm
https://github.com/phpstan-bot
https://github.com/VincentLanglet
https://github.com/SplotyCode
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.