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-Tools Blog: Date_Holidays - New releases

PHP.net: PHP 5.3.0RC1 Release Announcement

Symfony Project: symfony 1.0 released

PHP.net: PHP 5.4.18 Released!

CodeGear.com: Borland Announced Delphi for PHP


Community Events





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


api library laravel framework opinion release zendserver interview update symfony community install introduction package tips deployment language series podcast unittest

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