Skip to content

Fix SplFixedArray example for non-integer key error type#5227

Open
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/issue-3679-splfixedarray-typeerror
Open

Fix SplFixedArray example for non-integer key error type#5227
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/issue-3679-splfixedarray-typeerror

Conversation

@lacatoire
Copy link
Contributor

Since PHP 8.1.0, using a non-integer key throws TypeError instead of RuntimeException. Updated the example to correctly catch TypeError and document this behavior change.

Fixes #3679

Since PHP 8.1.0, using a non-integer key throws TypeError instead of
RuntimeException. Updated the example to correctly catch TypeError
and document this behavior change.

Fixes php#3679
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.

Wrong Example in SplFixedArray docs

1 participant