<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg" -->

---
title: PHPLinq 0.4.0 released on CodePlex! | daily.dev
description: PHPLinq 0.4.0, a PHP class library inspired by Microsoft's LINQ, has been released on CodePlex. The library lets developers write SQL-like queries against...
canonical: https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PHPLinq 0.4.0 released on CodePlex! | daily.dev
og:description: PHPLinq 0.4.0, a PHP class library inspired by Microsoft's LINQ, has been released on CodePlex. The library lets developers write SQL-like queries against...
og:url: https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg
og:image: https://api.daily.dev/og/posts/NVvZx38ZG.png
og:image:alt: PHPLinq 0.4.0 released on CodePlex!
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PHPLinq 0.4.0 released on CodePlex!

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 6 min read · 0 upvotes · 0 comments

## Summary

PHPLinq 0.4.0, a PHP class library inspired by Microsoft's LINQ, has been released on CodePlex. The library lets developers write SQL-like queries against arrays, objects, Zend_Db_Table-backed database tables, and XML sources using a fluent from()/where()/select() syntax with lambda-style expressions and anonymous class construction. When querying a database via Zend_Db_Table, PHPLinq translates the PHP query expression into an actual SQL statement tailored to the target database engine (e.g., using TRIM() on SQLite versus LTRIM/RTRIM on SQL Server), delegating execution to the database. The post walks through examples for array querying, database querying with generated SQL output, and XML/RSS feed querying with ordering and pagination. It also notes that PHPLinq and the author's other project PHPExcel were included in a Smashing Magazine list of useful PHP tools.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2009-01-29-phplinq-040-released-on-codeplex>

## Questions this post answers

### How does PHPLinq let you query data from arrays, databases, and XML in PHP?

PHPLinq uses a fluent from()->in()->where()->select() syntax modeled on .NET's LINQ. The in() call determines the data provider used: a plain array triggers an in-memory loop, while a Zend_Db_Table instance triggers automatic SQL generation executed directly on the database, and an XML source can be queried with xpath plus ordering and take() for pagination.

_Developers evaluating LINQ-style query abstractions for PHP can track library releases like this on daily.dev._

### Does PHPLinq's generated SQL differ between database engines like SQLite and SQL Server?

Yes, PHPLinq's Zend_Db_Table provider translates the same PHP where-clause expression into engine-specific SQL. For example, a trim() call compiles to TRIM() on SQLite but to LTRIM(RTRIM())) on Microsoft SQL Server, since SQL Server lacks a native TRIM() function, letting one PHP query run correctly across different database backends.

_Developers writing cross-database PHP queries can follow tooling that handles these engine quirks on daily.dev._

## Similar posts on daily.dev

- [LINQ in C\#](https://daily.dev/posts/linq-in-c--eoxkvhpkr) · C\# Corner · 36 upvotes · 2 comments
- [One Language to Rule Them? LINQ, Abstraction, and What's Next](https://daily.dev/posts/one-language-to-rule-them-linq-abstraction-and-what-s-next-mon8r0q6p) · We Are .NET · 29 upvotes · 2 comments
- [CakePHP 5.4 is around the corner – DerEuroMark](https://daily.dev/posts/cakephp-5-4-is-around-the-corner-dereuromark-ynzmlrpz0) · DerEuroMark · 2 upvotes · 3 comments
- [The Many Languages of Data: How .NET Learned to Speak in Formats](https://daily.dev/posts/the-many-languages-of-data-how-net-learned-to-speak-in-formats-56sn8nk5g) · We Are .NET · 41 upvotes · 1 comments

---

Tags: [#php](https://daily.dev/tags/php), [#.net](https://daily.dev/tags/.net), [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PHPLinq 0.4.0 released on CodePlex!","url":"https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg"},"datePublished":"2026-10-04T13:06:23.697Z","dateModified":"2026-10-04T13:09:27.446Z","description":"PHPLinq 0.4.0, a PHP class library inspired by Microsoft's LINQ, has been released on CodePlex. The library lets developers write SQL-like queries against...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/71d56db7031e9520280d310739dad890?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/71d56db7031e9520280d310739dad890?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,.net,sql","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"PHPLinq 0.4.0 released on CodePlex!"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/phplinq-0-4-0-released-on-codeplex--nvvzx38zg#faq","mainEntity":[{"@type":"Question","name":"How does PHPLinq let you query data from arrays, databases, and XML in PHP?","acceptedAnswer":{"@type":"Answer","text":"PHPLinq uses a fluent from()->in()->where()->select() syntax modeled on .NET's LINQ. The in() call determines the data provider used: a plain array triggers an in-memory loop, while a Zend_Db_Table instance triggers automatic SQL generation executed directly on the database, and an XML source can be queried with xpath plus ordering and take() for pagination. Developers evaluating LINQ-style query abstractions for PHP can track library releases like this on daily.dev."}},{"@type":"Question","name":"Does PHPLinq's generated SQL differ between database engines like SQLite and SQL Server?","acceptedAnswer":{"@type":"Answer","text":"Yes, PHPLinq's Zend_Db_Table provider translates the same PHP where-clause expression into engine-specific SQL. For example, a trim() call compiles to TRIM() on SQLite but to LTRIM(RTRIM())) on Microsoft SQL Server, since SQL Server lacks a native TRIM() function, letting one PHP query run correctly across different database backends. Developers writing cross-database PHP queries can follow tooling that handles these engine quirks on daily.dev."}}]}
```

