Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What PHP IDE's support the Facebook XHP extension? [closed]

The Facebook XHP extension introduces what are basically XML literals (well, XHTML literals) to the PHP language, allowing syntax like the following:

$foo = <div>hello</div>;

$foo = <div>
       hello
       </div>;

$foo = 'hello';
echo <div>{$foo}</div>; // outputs <div>hello</div>

$foo = 'hello';
echo <div>{substr($foo, 0, 2)}</div>; // outputs <div>he</div>

The biggest problem is that I cannot find an IDE that supports this syntax without flagging it as a syntax error.

I'm told that Facebook generally uses vim or emacs for development but I'm hoping for a more full-blown IDE that supports this syntax. At present, Netbeans 6.9, 7.0 M2, and Zend Studio 8 all flag this syntax as an error even though it executes fine on PHP with the XHP extension enabled.

Suggestions for an editor or plugin to an editor that allows this to work without syntax errors?

Info about XHP: https://github.com/facebook/xhp/wiki

like image 848
mjh_ca Avatar asked Nov 12 '10 06:11

mjh_ca


1 Answers

Try netbeans, go to Tools > Options find tab Miscellaneous > Files. Choose your Extension or click new. Remember insert ignored files pattern should be insert, if not you will get error syntax.

like image 171
hendrathings Avatar answered Nov 07 '22 03:11

hendrathings