1.3.0
1.3.0
Add $preserveKey flag ability to not preserve key on Finder::last()
$data = [6, 7, 8, 9];
$filter = static fn ($datum): bool => $datum > 5;
// RETURN the Array key, pass true to 3rd arg
// ... with PRESERVE original key
var_dump(\ArrayLookup\Finder::last($data, $filter, true)); // 3
// ... with RESORT key, first key is last record, pass false to 4th arg
var_dump(\ArrayLookup\Finder::last($data, $filter, true, false)); // 0