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.
Product Version = NetBeans IDE Dev (Build 2013-08-05_21-04-21) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_17 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Here is a sample PHP file: <!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <div id="wrap"> <div class="container"> <div class="row"> <? foreach ($content_items as $i => $content) { if ($i == 1) { echo '<div class="foo">'; } echo $content; ?> Hello World!!! <? if ($i == 1) { echo '</div>'; } } ?> </div><!-- .row --> </div><!-- .container --> </div><!-- #wrap --> </body> </html> TEST CASE 1: Click on the closing end tag for the div with the "row" class. Expected Results: The tag matching blue bracket on the left side of the editor should match with the opening div tag with the class "row" Actual Results: The tag matching blue bracket on the left side of the editor matches with the opening div tag with the class "foo". This is wrong. It shouldn't even be looking at the PHP for a matching tag. TEST CASE 2: Click on the opening div tag with the "row" class. Expected Results: The tag matching blue bracket on the left side of the editor should match it's corresponding closing div tag. Actual Results: The tag matching blue bracket on the left side of the editor matches the "container" class closing div tag. This is one div tag off. I think it is taking into account the div tag inside PHP.
You have disallowed usage of short open tags. Allow it in Project properties -> Sources -> Allow short open tags. Or use long opent tags (<?php). In your case whole file is parsed as html, so html matched div blocks in php part (which wasn't php part actually).