Skip to content

Simplify ZPP code#16

Closed
twose wants to merge 1 commit into
TysonAndre:is_listfrom
twose:patch-1
Closed

Simplify ZPP code#16
twose wants to merge 1 commit into
TysonAndre:is_listfrom
twose:patch-1

Conversation

@twose

@twose twose commented Sep 4, 2020

Copy link
Copy Markdown

No description provided.

@TysonAndre

Copy link
Copy Markdown
Owner

array_is_list(array): bool was proposed in php#4886 (comment) , but I'm opposed to doing that - is_numeric() doesn't throw for objects, for example. This is implementing is_list(mixed): bool, and should not throw for non-array types - it's already as short as is practical

This is why the tests fail with your proposed change.

@TysonAndre TysonAndre closed this Sep 4, 2020
@twose twose deleted the patch-1 branch September 4, 2020 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants