Fork me on GitHub


A PHP library designed to make it easy to consume and produce RDF.

Designed for use in mixed teams of experienced and inexperienced RDF developers. Written in PSR-2 compliant PHP and tested extensively using PHPUnit.

Getting Started »

The latest stable version of EasyRdf is version 0.9.0.


$foaf = new EasyRdf_Graph("");
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf:name')."\n";


  • PHP 5.3 or newer
  • The pcre extension (enabled by default)
  • The mbstring extension (usually available)


  • Extensive unit tests written using PHPUnit
  • Built-in parsers and serialisers: RDF/JSON, N-Triples, RDF/XML, Turtle
  • Optional parsing support for: ARC2, Redland Bindings, rapper
  • Optional support for Zend_Http_Client
  • No required external dependancies upon other libraries (PEAR, Zend, etc...)
  • Complies with the PSR-2 coding style
  • Type mapper - resources of type foaf:Person can be mapped into PHP object of class Foaf_Person
  • Support for visualisation of graphs using GraphViz
  • Composer compatible
  • Comes with a number of examples