Folks in the interoperability team at Microsoft just announced something they've been cooking for a while, developed Persistent Systems: a client PHP toolkit for Astoria services. It follows more or less the model of the .NET client where you can run a tool during development to get code-gen based on a data service metadata, and then it has a runtime library that can be used to send queries, obtain responses as PHP objects, track and submit changes, etc. They implemented both the Atom and JSON formats, and even threw in batching support.

The best part is that it's all written in PHP (both code-gen tool and runtime), so it runs in any environment where PHP and the toolkit dependencies (XML, XSLT, CURL) are available.

For more details check out the post in the interoperability team's blog, the kick off Channel 9 video, and the PHP toolkit project in codeplex.

-pablo