diff options
author | Dusk <dusk@woofle.net> | 2019-11-03 18:51:49 -0800 |
---|---|---|
committer | Tyson Andre <tysonandre775@hotmail.com> | 2021-01-20 18:53:48 -0500 |
commit | 13c430b1db0ca1595122ce552ce76f84b32795f4 (patch) | |
tree | fbcbc5f25971911f3d73eb3c9f85e20d697fed59 /sapi/cli/php_cli.c | |
parent | 04db2c873588633daf6639a7de4a3ffd5936c47c (diff) | |
download | php-git-13c430b1db0ca1595122ce552ce76f84b32795f4.tar.gz |
Add array_is_list(array $array) function
This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the community usage
of "list" as an annotation type, cf.
https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists
Rebased and modified version of #4886
- Use .stub.php files
- Add opcache constant evaluation when argument is a constant
- Change from is_list(mixed $value) to array_is_list(array $array)
RFC: https://wiki.php.net/rfc/is_list
Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
Co-Authored-By: Dusk <dusk@woofle.net>
Closes GH-6070
Diffstat (limited to 'sapi/cli/php_cli.c')
0 files changed, 0 insertions, 0 deletions