Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 17f05e1ecc
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (16 sloc) 0.458 kb
// Extremely simple implementation of XHP client library useful primarily for
// unit tests.
class :x {
public function __construct($attrs, $children) {
$this->attrs = $attrs;
$this->children = $children;
public function __toString() {
$head = '<x';
foreach ($this->attrs as $key => $val) {
$head .= htmlspecialchars($key).'='.htmlspecialchars($val);
return $head.'>'.implode('', $this->children).'</x>';
Jump to Line
Something went wrong with that request. Please try again.