foxworn3365 / listdictionaries
Use arrays and object in PHP as List<T> and Dictionary<T, T> in C#
dev-main
2024-01-15 15:14 UTC
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2024-09-15 16:45:18 UTC
README
List<T>
and Dictionary<T, T>
in PHP
Install
You can install it on composer
composer require foxworn3365/listdictionaries
Examples
List
$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