Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 164347 - Highlight pairs for colon alternate syntax (if, foreach, while)
Highlight pairs for colon alternate syntax (if, foreach, while)
Product: php
Classification: Unclassified
Component: Editor
All All
: P3 with 3 votes (vote)
: 7.0.1
Assigned To: issues@php
Depends on:
  Show dependency treegraph
Reported: 2009-05-03 21:33 UTC by caesar2k
Modified: 2011-05-31 13:02 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description caesar2k 2009-05-03 21:33:53 UTC
Add the support to match the pair (like happens with brackets) for the alternate PHP syntax with colons.
if ($i == 0):|


Leaving the cursor at | would highlight the "endif;" part. Same for foreach: / endforeach, while: / endwhile, else:,
elseif ():, and switch: / endswitch;
Comment 1 jeremyclarke 2009-08-06 20:21:51 UTC
+1 for this idea. IMHO the colon syntax for PHP is a LOT more readable. A } just isnt' as expressive as 'endforeach'. 

If not on the colon then it would be great if the words 'if' and 'endif' could be highlighted in the same way as html
opening and closing tags are handled. 
Comment 2 Tomasz Slota 2010-02-10 08:46:28 UTC
reassigning to default owner
Comment 3 dmakovec 2010-03-16 01:55:25 UTC
+1 for this please.  Colon syntax is far more readable than braces in templates, but not having the ability to jump between begin and end blocks in this format makes it less tempting to use.
Comment 4 Filip Zamboj 2010-09-15 12:28:58 UTC
batch reassigning
Comment 5 Petr Pisl 2011-05-11 12:58:27 UTC
Committed into web-main today. Should be available in the next daily build.
Comment 6 Quality Engineering 2011-05-12 04:36:46 UTC
Integrated into 'main-golden', will be available in build *201105120000* on (upload may still be in progress)
User: Petr Pisl <>
Log: #164347 - Highlight pairs for colon alternate syntax (if, foreach, while)
#183555 - Syntax highlighting if endif constructs
#187188 - Something similar to "match brackets" for "alternative syntax for control structures"

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo