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

Greg Beaver\'s Blog: PEAR_RemoteInstaller version 0.3.0 released

DynamicWebPages.de: PHP 4.4.4C1 Released for Testing

PHP.net: PHP 5.1.2 Released

Derick Rethans' Blog: 10 years of Xdebug and Xdebug 2.2.0 released

Tillate.com Blog: Unit test practice at tilllate.com


Community Events





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


interview code framework series introduction deployment laravel developer zendserver release threedevsandamaybe tips conference list development language community application podcast api

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