This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 191712 - Support Facebook XHP extension for syntax checking
Summary: Support Facebook XHP extension for syntax checking
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
Depends on:
Reported: 2010-11-07 21:12 UTC by mjh_ca
Modified: 2012-04-24 14:26 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description mjh_ca 2010-11-07 21:12:12 UTC
Please fix PHP syntax checking so that it is aware of the Facebook XHP extension for PHP which allows inline HTML -- for example, this is acceptable:

echo <div>foo</div>;

echo <div>

Even when this extension is enabled on the system's php.ini , and the code runs fine, but NetBeans shows these lines as syntax errors.
Comment 1 mjh_ca 2010-11-07 21:13:00 UTC
See for info about XHP
Comment 2 mjh_ca 2010-11-07 21:15:48 UTC
Additional examples.  Note that anything within curly brackets {} are considered PHP expressions.  Is NetBeans simply using the PHP runtime to verify syntax (and could therefore allow the XHP extension to handle this) or are you doing validation some other way?  Hopefully this is an easy fix with the XHP extension enabled.

All of the following are considered acceptable with XHP:

$foo = 'bar';

echo <div>{$foo}</div>;

echo <div>{substr($foo, 0, 1)}</div>;

echo <div>
     {substr($foo, 0, 1)}