Redland/librdf offers powerful features like being able to persist an RDF model to a relational database (only PostGreSQL seems to work on my setup with 1.0.16, but I may have misconfigured it). You can then do SPARQL queries over the model, and lots of other nice things.
But thanks to a gentleman named David Shea, there is an object-oriented library named LibRDF (case is sensitive), that helps write nice looking PHP.
In his post, Felix illustrates how you may use it to parse Richard Cyganiak’s FOAF profile.
But the examples he gives don’t illustrate the full potential of persistence of the RDF graph into the DB.
Here’s my contribution in 2 examples that will hopefully help : first, one that load Richard’s FOAF to the DB, and one, that later retrieve the saved model and perform the same query (both pushed to my github clone of the library).
There may be some problems with the use of librdf, including its availability, as it is not full PHP of course… and I’ve heard of memory management problems, but, depening on your needs, this may be quite handy for writing Linked Data applications.