RAPID - PHP Close Tag Not Required

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
User avatar
Will Fastie
Posts: 160
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA
Contact:

RAPID - PHP Close Tag Not Required

Post by Will Fastie »

According to the PSR-2: Coding Style Guide:
  • The closing ?> tag MUST be omitted from files containing only PHP.
Currently, Rapid shows the <?php tag as unbalanced if the closing ?> is not present in the file.

Therefore I suggest adding the following option to Preferences | Language Options | PHP:
  • Do not require a closing ?> when a file contains only PHP.
Note that a PHP syntax check does not trip an error when the ?> is omitted.

It has become clear to me that omitting the closing ?> is a good programming practice because it can prevent stream errors.
Will
WebDesignBuild.biz, Fastie.com
User avatar
pmk65
Posts: 678
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: RAPID - PHP Close Tag Not Required

Post by pmk65 »

+1

I always remove it.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
Will Fastie
Posts: 160
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA
Contact:

Re: RAPID - PHP Close Tag Not Required

Post by Will Fastie »

I'm just starting to remove it. But it's not helpful when the editor flags it as an unclosed tag when it's legal syntax.
Will
WebDesignBuild.biz, Fastie.com
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: RAPID - PHP Close Tag Not Required

Post by Aivars »

I'll +2 the relevant suggestion. For now don't pay any attention to the red opening tag. Thanks.
Blumentals Software Programmer
User avatar
Will Fastie
Posts: 160
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA
Contact:

Re: RAPID - PHP Close Tag Not Required

Post by Will Fastie »

Thanks. I am ignoring the highlight but because I am still a bit new to Rapid I'm sensitive to everything.
Will
WebDesignBuild.biz, Fastie.com
User avatar
Will Fastie
Posts: 160
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA
Contact:

Re: RAPID - PHP Close Tag Not Required

Post by Will Fastie »

I also noticed that the file created by File | New | PHP Script creates a file that includes the closing of the PHP tag.
Will
WebDesignBuild.biz, Fastie.com
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: RAPID - PHP Close Tag Not Required

Post by Aivars »

You can open %APPDATA%\Blumentals\WeBuilder\templates\PHP and edit Empty.php and change its contents to whatever you like.
Blumentals Software Programmer
User avatar
Will Fastie
Posts: 160
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA
Contact:

Re: RAPID - PHP Close Tag Not Required

Post by Will Fastie »

Aivars wrote:%APPDATA%\Blumentals\WeBuilder\templates\PHP
%APPDATA%\Blumentals\Rapid PHP\templates\PHP

This made me wonder whether some things should be one level up, as in

%APPDATA%\Blumentals\templates\PHP

or

%APPDATA%\Blumentals\editors\templates\PHP

I'm not making a feature request, just wondering...
Will
WebDesignBuild.biz, Fastie.com
Post Reply