Facebook Engineering Blog
XHP: A New Way to Write PHP

XHP: A New Way to Write PHP

2/10/2010 · Marcel Laverdet

What this post added

Introduced XHP, a PHP extension that augments PHP syntax to make front-end code easier to understand and prevent cross-site scripting attacks by treating XML document fragments natively within PHP. XHP provides context-specific escaping for PCDATA, server-side parse-time error detection for malformed markup, and allows for the definition of custom elements to condense complex components into simple XHP tags, acting as a programmatic UI library and a templating system.

Read the original post ↗