3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_time = '4:00'; $time_slot = ['1:00','3:00','15:00','19:00']; var_export( array_filter( $time_slot, fn($v) => strnatcmp($current_time, $v) === -1 ) );

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
162.57 ms | 1871 KiB | 13 Q