News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Community News:
XHP Released by Facebook (XML in PHP)
February 10, 2010 @ 15:10:23

Even before they've release the source for their much hyped HipHop PHP tool, Facebook has slipped another tool in under the radar and have already released it in github - XHP.

On the official announcement they describe what the tool is and what it can do for you:

XHP is a PHP extension which augments the syntax of the language to both make your front-end code easier to understand and help you avoid cross-site scripting attacks. XHP does this by making PHP understand XML document fragments, similar to what E4X does for ECMAScript (JavaScript). While PHP is typically used to write front-end code, by itself it isn't a very good language for generating HTML (as evidenced by the popularity of templating engines like Smarty). XHP is something between a programmatic UI library and a full templating system

Rasmus Lerdorf took the opportunity to play with this new tool and run some benchmarks on its performance in a more real situation than the form example Facebook gave:

The real question here is what is this runtime xml validation going to cost you. [...] Note that to build XHP you will need flex 2.5.35 which most distros won't have installed by default. Grab the flex tarball and ./configure && make install it. Then you are ready to go.

He created a simple class (a "singleton") and ran some benchmarks against it with Siege. I won't share the results of those benchmarks here, though - you'll need to visit Rasmus' site for those (but here's a hint, the future's not bright).

1 comment voice your opinion now!
xhp facebook release github rasmuslerdorf


blog comments powered by Disqus

Similar Posts

php|architect: June 2007 Issue Released

Slawek Lukasiewicz's Blog: New Features in PHP 5.4 - JSON Extension & header_register_callback

The Zend Blog: Zend Studio for Eclipse

Jared White's Blog: Status update on xajax and Willowgarden

Derick Rethans' Blog: New VLD and translit releases


Community Events





Don't see your event here?
Let us know!


introduction developer framework code project wordpress community list release podcast threedevsandamaybe series api laravel application interview configure library language bugfix

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework