Use C# LINQ like patterns in PHP