How to enable XHP on Hiphop for PHP
A quick primer on how to enable XHP on Hiphop for PHP:
- Set the Eval.EnableXHP to true to that XHP will work on the interpreter if you need that. This will enable the XHP processor which will convert xml syntax to the __xhp classes.
- Get the XHP PHP extension from https://github.com/facebook/xhp
- Copy the files in the php-lib/ folder to your project
- Include them in the source files where you want to use XHP.
You can now use the XML syntax in PHP.
The authors of XHP added array dereferencing as a bonus to XHP, so you can now also use that.
Advertisement

No comments yet
Jump to comment form | comment rss [?] | trackback uri [?]