3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['a', 'b', 'c']; var_dump(array_is_list($array)); $filter = array_filter($array, fn ($item) => $item != 'a'); var_dump(array_is_list($filter));
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
bool(true) bool(false)
Output for 8.0.1 - 8.0.30
Fatal error: Uncaught Error: Call to undefined function array_is_list() in /in/JZS9N:5 Stack trace: #0 {main} thrown in /in/JZS9N on line 5
Process exited with code 255.

preferences:
109.71 ms | 401 KiB | 91 Q