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:
160.53 ms | 1874 KiB | 13 Q