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 125703 - A syntax error should be shown for the incorrect string
Summary: A syntax error should be shown for the incorrect string
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks: 126072
  Show dependency tree
 
Reported: 2008-01-21 18:35 UTC by Victor Vasilyev
Modified: 2008-03-27 12:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Vasilyev 2008-01-21 18:35:29 UTC
A syntax error should be shown for the following string in the editor:

"A banana is $fruits['banana']."
                     ^^^^^^^^

Because, a run-time error will occur:

Error: PHP Parse error:  syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or
T_NUM_STRING in <someFile> on line <someLine>


Note, this example from the "Simple syntax" section of the "Strings" chapter of the PHP Manual:
http://www.php.net/manual/en/language.types.string.php
Comment 1 Denis Anisimov 2008-01-30 13:15:23 UTC
Such syntax is not handled by .nbs file.
This bug should be addressed to global issue with error detection.
We need manually written error detection framework for such cases.
Comment 2 Petr Pisl 2008-03-27 12:59:26 UTC
Fixed with the new PHP parser.