{"id":22840941,"url":"https://github.com/mkloubert/phpLINQ","last_synced_at":"2025-08-11T00:31:21.128Z","repository":{"id":26321202,"uuid":"29769500","full_name":"mkloubert/phpLINQ","owner":"mkloubert","description":"LINQ concept for PHP","archived":false,"fork":false,"pushed_at":"2019-10-30T05:38:15.000Z","size":1775,"stargazers_count":40,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-13T16:25:58.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkloubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://paypal.me/MarcelKloubert"]}},"created_at":"2015-01-24T07:42:36.000Z","updated_at":"2024-04-09T12:51:08.000Z","dependencies_parsed_at":"2022-07-12T16:08:30.950Z","dependency_job_id":null,"html_url":"https://github.com/mkloubert/phpLINQ","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2FphpLINQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2FphpLINQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2FphpLINQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2FphpLINQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkloubert","download_url":"https://codeload.github.com/mkloubert/phpLINQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229474529,"owners_count":18078717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T01:14:04.049Z","updated_at":"2024-12-13T01:14:05.412Z","avatar_url":"https://github.com/mkloubert.png","language":"PHP","funding_links":["https://paypal.me/MarcelKloubert"],"categories":["PHP [⬆](#table-of-contents-)"],"sub_categories":[],"readme":"# phpLINQ\n\nA [LINQ](https://en.wikipedia.org/wiki/Language_Integrated_Query) concept for [PHP](https://en.wikipedia.org/wiki/PHP).\n\nMost methods are chainable as in [.NET](https://en.wikipedia.org/wiki/.NET_Framework) context.\n\nHere you can find the [DOCUMENTATION](https://github.com/mkloubert/phpLINQ/wiki) in the wiki or the [API](http://phplinq.marcel-kloubert.eu/api/) documentation.\n\n## Features\n\n* [Lambda expressions](https://github.com/mkloubert/phpLINQ/wiki/Lambda-expression)\n* Any kind of [lists or iterators](https://github.com/mkloubert/phpLINQ/wiki/Sequence) can be used\n* Most methods are chainable as in [.NET](https://en.wikipedia.org/wiki/.NET_Framework) context\n* Enhancements / improvements for use in PHP context\n\n## Requirements\n\n* PHP 5.3+ ([branch v2](https://github.com/mkloubert/phpLINQ/tree/v2) or [branch v1](https://github.com/mkloubert/phpLINQ/tree/v1))\n* PHP 7+ (master branch)\n\n## Example\n\nA complete list can be found at the [live example page](https://github.com/mkloubert/phpLINQ/tree/master/examples).\n\n```php\nuse \\System\\Linq;\n\n$seq = Enumerable::fromValues(5979, 23979, null, 23979, 1781, 241279);\n\n$newSeq = $seq-\u003eselect('$x =\u003e (string)$x')  // transform all values\n                                            // to string\n              -\u003ewhere('$x =\u003e !empty($x)')    // filter out all values that are empty\n              -\u003eskip(1)    // skip the first element ('5979')\n              -\u003etake(3)    // take the next 3 elements from current position\n                            // ('23979', '23979' and '1781')\n              -\u003edistinct()    // remove duplicates\n              -\u003eorder();    // sort\n                                    \nforeach ($newSeq as $item) {\n    // [0] '1781'\n    // [1] '23979'\n}\n```\n\n## What you need\n\n* The [phpLINQ.php](https://github.com/mkloubert/phpLINQ/blob/master/phpLINQ.php) file\n* The whole [System](https://github.com/mkloubert/phpLINQ/tree/master/System) folder\n\nThe file / directory structure:\n\n```\nSystem/\nphpLINQ.php\n```\n\n## Implemented\n\n* [aggregate()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.aggregate()-method)\n* [all()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.all()-method)\n* [any()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.any()-method)\n* [average()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.average()-method)\n* [cast()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.cast()-method)\n* [concat()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.concat()-method)\n* [contains()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.contains()-method)\n* [count()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.count()-method)\n* [defaultIfEmpty()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.defaultIfEmpty()-method)\n* [distinct()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.distinct()-method)\n* [elementAt()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.elementAt()-method)\n* [elementAtOrDefault()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.elementAtOrDefault()-method)\n* [except()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.except()-method)\n* [first()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.first()-method)\n* [firstOrDefault()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.firstOrDefault()-method)\n* [groupBy()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.groupBy()-method)\n* [groupJoin()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.groupJoin()-method)\n* [intersect()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.intersect()-method)\n* [join()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.join()-method)\n* [last()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.last()-method)\n* [lastOrDefault()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.lastOrDefault()-method)\n* [max()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.max()-method)\n* [min()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.min()-method)\n* [ofType()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.ofType()-method)\n* [orderBy()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.orderBy()-method)\n* [orderByDescending()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.orderByDescending()-method)\n* [reverse()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.reverse()-method)\n* [select()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.select()-method)\n* [selectMany()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.selectMany()-method)\n* [sequenceEqual()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.sequenceEqual()-method)\n* [single()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.single()-method)\n* [singleOrDefault()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.singleOrDefault()-method)\n* [skip()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.skip()-method)\n* [skipWhile()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.skipWhile()-method)\n* [sum()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.sum()-method)\n* [take()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.take()-method)\n* [takeWhile()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.takeWhile()-method)\n* [toArray()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.toArray()-method)\n* [toDictionary()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.toDictionary()-method)\n* [toList()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.toList()-method)\n* [toLookup()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.toLookup()-method)\n* [union()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.union()-method)\n* [where()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.where()-method)\n* [zip()](https://github.com/mkloubert/phpLINQ/wiki/IEnumerable.zip()-method)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkloubert%2FphpLINQ","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkloubert%2FphpLINQ","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkloubert%2FphpLINQ/lists"}