3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1, 2, 3, 4, 5]; $b = array_filter($a, fn ($x) => $x <= 3); $c = array_filter($a, fn ($x) => $x >= 3); var_dump(array_is_list($a)); var_dump(array_is_list($b)); var_dump(array_is_list($c));
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
bool(true) 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/VegUr:8 Stack trace: #0 {main} thrown in /in/VegUr on line 8
Process exited with code 255.

preferences:
56.66 ms | 401 KiB | 91 Q