<?php $array = ['one.php', 'two.txt']; var_export( array_filter( $array, fn($v) => str_ends_with($v, '.txt') ) );
You have javascript disabled. You will not be able to edit any code.