Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master


PHP URI Template Parser
A feature-complete URI Template Parser class for PHP >= 5.2.3

Dual licensed under the MIT or GPL Version 2 licenses.

As of this writing, URI Template is still very much a moving target.
The latest version of the URI Template Spec can be found at

# Usage
require 'URI_Template_Parser.class.php';

$template = new URI_Template_Parser("/users/{userid}");
$url = $parser->expand(array('userid' => 5));

Additional usage examples can be found in the tests file.


 * Implement partial modifiers (":" and "^")
 * Throw some meaningful errors when things go wrong
Something went wrong with that request. Please try again.