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 122373

Summary: Unable to close php block after string // ? '
Product: php Reporter: kozlov <kozlov>
Component: EditorAssignee: Denis Anisimov <ads>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description kozlov 2007-11-20 13:04:17 UTC
Reproduced in build071115.

Example:

<body>

<?php

// Why? It doesn't work.

?>

<div>

</div>

<?php

$a= 1;

?>

</body>
Comment 1 Denis Anisimov 2007-11-20 14:15:45 UTC
Reproduced.
The problem is in line comments that cannot contain "?>" inside this comment.
Line comment is ended if "?>" appeared and it is treated as end of php block.
Described behavior is consequence of current php block recognition impl.
Comment 2 Denis Anisimov 2007-11-21 09:50:34 UTC
    Checking in php/lexer/src/org/netbeans/modules/php/lexer/InsidePhpStateStrategy.java;
    /cvs/scripting/php/lexer/src/org/netbeans/modules/php/lexer/InsidePhpStateStrategy.java,v  <-- 
InsidePhpStateStrategy.java
    new revision: 1.8; previous revision: 1.7
    done
Comment 3 Alexei Mokeev 2007-11-21 10:08:31 UTC
Changed target milestone to 6.0
Comment 4 kozlov 2007-12-03 17:41:17 UTC
Verified in beta.