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 192458 - Line breaks in PHP template
Summary: Line breaks in PHP template
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
Depends on:
Reported: 2010-11-25 10:53 UTC by kamazee
Modified: 2016-09-22 17:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description kamazee 2010-11-25 10:53:52 UTC
2 line breaks are added after <?php when using a code template if <?php is placed into the first line.

How to reproduce:
1. Create new PHP code template
2. Put the following text in a new template (without apostrophes of course): '<?php echo "Is it a bug?";'
3. Use a new template: (Right click on context menu of any project's folder) » new » PHP » Just created template

The following apeears:

echo "Is it a bug?";

instead of
<?php echo "Is it a bug?";

The bug appears only if <?php is at the first line and not closes with ?>
Comment 1 Ondrej Brejla 2011-10-03 13:54:58 UTC
It's because formatter rules are applied to that new can remove blank line after <?php by "Tools->Options->Editor->Formatting->PHP->Blank Lines->After open tag" (set it to 0), but I think that there is no option for disabling "new line" after php open tag...
Comment 2 Ondrej Brejla 2012-09-12 09:36:43 UTC
Enhancement, since this option has never been implemented.
Comment 3 amobilia 2016-09-22 17:05:29 UTC
The option is present on 8.2rc / Dev 201609210002 

Formating -> PHP -> Blank lines -> After open tag
But if you set 0 instead of 1, nothing appears...