[php-src] Issue #8640: `array_is_list` incorrectly identifies an array with `float` keys as a list

From: Date: Fri, 27 May 2022 02:19:37 +0000
Subject: [php-src] Issue #8640: `array_is_list` incorrectly identifies an array with `float` keys as a list
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241597@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8640 Author: samlev ### Description The following code: ```php <?php array_is_list([0.0 => 'value', 1.0 => 'value']); ``` Resulted in this output: ``` true ``` But I expected this output instead: ``` false ``` As is_int(0.0) returns false, and a "list" is keyed with sequential integers from 0..n-1, I would expect that an array keyed with floats to not classify as a list. ### PHP Version PHP 8.1.6 ### Operating System Ubuntu 20.04

« previous php.bugs (#241597) next »