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 ) );

preferences:
42.43 ms | 406 KiB | 5 Q