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 196823 - HereDoc for PHP do not work properly
Summary: HereDoc for PHP do not work properly
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 22:45 UTC by ploeger.private
Modified: 2011-07-28 11:43 UTC (History)
1 user (show)

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 ploeger.private 2011-03-17 22:45:20 UTC
This is working right:

<?php

if (isset ($_POST)) {
echo <<<abc
test output1234
abc;
}

?>


but if I want to format my sourcecode like the following example, i get an syntax error (highlighted red in IDE):

<?php

if (isset ($_POST)) {
    echo <<<abc

    abc;
}

?>
_______________________________

Product Version = NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) Client VM 19.1-b02
Comment 1 ploeger.private 2011-03-17 23:00:05 UTC
Everythings fine. It works correct, my fault. If code is formatted I also get an parse error from php.
Comment 2 OndrejBrejla 2011-03-18 09:55:36 UTC
That's right. It works properly, just read http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc (read the warning)

You can't have spaces before a closing identifier (your:    abc;). If you use NB Source -> Format...it works properly too...ending identifier is not indented.

So this issue is irelevant.