Download the PHP package athari/yalinqo without Composer

On this page you can find all versions of the php package athari/yalinqo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yalinqo

YaLinqo: Yet Another LINQ to Objects for PHP

Coveralls Coverage Scrutinizer Code Quality Packagist Downloads Packagist Version

Features

Implemented methods

Some methods had to be renamed, because their names are reserved keywords. Original methods names are given in parentheses.

In total, more than 80 methods.

Usage

Add to composer.json:

Add to your PHP script:

Example

Process sample data:

Output (compacted):

Versions

Version Status PHP Notes

1.x (2012)

1.0−1.1 legacy 5.3−7.4
  • Manually implemented iterators

2.x (2014)

2.0−2.4 legacy 5.5−7.4
  • Rewrite using PHP 5.5 generators
  • Causes deprecation warnings in PHP 7.2+ due to use of create_function
2.5 maintenance 5.5+
  • Switched from create_function to eval for string lambdas
  • May cause security analysis warnings due to use of eval

3.x (2018)

3.0 maintenance 7.0+
  • Abandoned rewrite with performance improvements
  • Released 7 years later with most of the performance-related changes dropped
  • May cause security analysis warnings due to use of eval

4.x (2025)

4.0 planned 8.0+(?)
  • Strong types everywhere, string lambdas nuked from existence

Breaking changes

Version 1.x → 2.x

Version 2.x → 3.x

Legacy information

Legacy features

[!NOTE]

Before arrow functions were added in PHP 7.4, the choice was between the ridiculously verbose anonymous function syntax (function ($value) { return $value['key']; }) and rolling your own lambda syntax (like $v ==> $v["key"]). This is why “string lambdas” were a necessity at the time.

[!CAUTION]

When using legacy versions of YaLinqo and PHP:

  1. You MUST NOT[^1] use user-provided strings to construct string lambdas. This directly opens you to passing to user-provided strings to eval, which is literally the worst thing you can do security-wise.
  2. You SHOULD NOT[^1] dynamically construct string lambdas in general, even if it seems convenient. Passing incorrect code to eval throws a ParseError. An exception to this rule may be constructing a trivial lambda from an array of predefined values.
  3. You SHOULD[^1] use full closure syntax instead of string lambdas when you need access to variables in scope.

When all your string lambdas are single-quoted string constants, there’s no security risk in using them. If you’re still paranoid about eval, just never use string lambdas.

Links

Documentation

[!TIP] If you’re new to LINQ, you should read the series of articles by Mr. X, as they’re very beginner-friendly.

Articles

Alternatives

Realistically, there’re none. This is the only PHP library in existence which implements lazy evaluation, deals with keys in iterators properly, has documentation and actually works (until yet another breaking change in PHP), with everything else failing in 2+ ways. However, some alternatives are worth mentioning.

Related projects

PHP

If you want to contribute to the project without writing any code, consider annoying the developers of PHP on GitHub and their mailing list whenever they decline yet another useful feature.

If you’re successful and actually get them to implement PFA + Pipe v4 (?), then non-lazy LINQ ports will lose 80% of their users, as PHP array functions will become usable by themselves without turning the code into unreadable spaghetti.

And if devs of PHP implement pipes for iterables, then YaLinqo itself will need a complete rewrite for 20% of cases and become obsolete for 80% of them. I wouldn’t hold my breath though, as that thing has been in discussion for like 10 years already.

License

Simplified BSD License
Copyright © 2012–2025, Alexander Prokhorov

History

Star history chart

Contributors

[^1]: The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.


All versions of yalinqo with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package athari/yalinqo contains the following files

Loading the files please wait ...