List<T>
and Dictionary<T, T>
in PHP
You can install it on composer
composer require foxworn3365/listdictionaries
$list = PHPList::new("string|int", [
"hello",
"goodbye",
"your name is owo"
]);
$list->where(fn($el) => strpos($el, "e"))->foreach(function ($el) {
echo $el . PHP_EOL;
});
Result:
hello
your name is owo