3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['one.php', 'two.txt']; var_export( array_filter( $array, fn($v) => str_ends_with($v, '.txt') ) );

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
216.88 ms | 1875 KiB | 11 Q