A comprehensive PHP port of .NET LINQ to Objects for querying arrays and iterables with lazy evaluation.
YaLinqo is a PHP library that ports .NET's LINQ (Language Integrated Query) functionality to PHP. It provides over 80 chainable methods for expressive data manipulation on arrays and iterators, featuring lazy evaluation to optimize performance with large datasets.
PHP developers familiar with .NET LINQ who want similar query capabilities in PHP, or those working with complex data transformations on arrays and iterators who need a declarative, chainable syntax.
Developers choose YaLinqo for its high fidelity to .NET LINQ behavior, best-in-class performance among full-featured LINQ ports (at least 2x faster than alternatives), and its lazy evaluation system that processes data on-demand without unnecessary computations.
Yet Another LINQ to Objects for PHP [Simplified BSD]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements over 80 methods from .NET LINQ, offering a comprehensive suite for data manipulation without sacrificing fidelity to the original behavior, as detailed in the README's method list.
Processes data on-demand, which can significantly improve performance with large datasets by avoiding unnecessary computations and memory usage, a core feature emphasized in the documentation.
Treats keys as first-class citizens, ensuring they are preserved through transformations where possible, unlike many native PHP array functions, as highlighted in the key features section.
Benchmarks from the YaLinqoPerf repository show it's at least twice as fast as other full-featured LINQ ports like Ginq and Pinq, making it the performance leader among alternatives.
A lightweight library that works with native PHP arrays and iterators, requiring no external packages for core functionality, as stated in the features and usage sections.
In versions 2.x and earlier, string lambdas use `eval`, posing security risks if user-provided strings are included, and the README explicitly warns against this with strong cautionary notes.
The library has undergone significant breaking changes between major versions (e.g., 1.x to 2.x, 2.x to 3.x), which can complicate maintenance and upgrades, as outlined in the version history table.
Current stable versions (3.x) support PHP 7.0+ but lack strong typing features planned for version 4.0, which may be a drawback for projects on PHP 8+ seeking full type safety.