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 182269 - syntax error happens around /* ... echo "*/"
Summary: syntax error happens around /* ... echo "*/"
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-18 01:51 UTC by Masaki Katakai
Modified: 2011-07-01 14:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (28.53 KB, image/png)
2010-03-18 01:51 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2010-03-18 01:51:48 UTC
Created attachment 95344 [details]
screenshot

I tried this with NetBeans 6.8 and current trunk build (201003170201)

  Product Version: NetBeans IDE Dev (Build 201003170201)
  Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
  System: SunOS version 5.11 running on x86; UTF-8; ja_JP (nb)

1. Create a PHP project and create a PHP class

2. Enter the following

<?php

function foo1() {
    echo "***";
}

function foo2() {
    echo "*/";
}

?>

3. Modify to

<?php

function foo1() {
    echo "***";
}

/*
 *
function foo2() {
    echo "*/";
}

*/

?>
Comment 1 Filip Zamboj 2010-03-19 16:22:34 UTC
Product Version: NetBeans IDE Dev (Build 100318-3668deab869d)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01

reproducible
Comment 2 Petr Pisl 2011-07-01 14:19:14 UTC
I think this is correct. The comment that is quoted through /* */ is everything inside the delimiters. So when the parser finds */ in echo, it's taken as the end of the comment. It doesn't matter that it's in quotes. 

The runtime works in the same way. Please add a comment or reopen if you thing that I'm not right.