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!

RAPID - PHP Close Tag Not Required

Postby Will Fastie » Sat Apr 28, 2018 6:58 pm

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
Will Fastie
 
Posts: 136
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA

Re: RAPID - PHP Close Tag Not Required

Postby pmk65 » Sat Apr 28, 2018 10:53 pm

+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
pmk65
 
Posts: 584
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: RAPID - PHP Close Tag Not Required

Postby Will Fastie » Tue May 01, 2018 3:47 pm

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
Will Fastie
 
Posts: 136
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA

Re: RAPID - PHP Close Tag Not Required

Postby Aivars » Wed May 02, 2018 12:24 pm

I'll +2 the relevant suggestion. For now don't pay any attention to the red opening tag. Thanks.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2284
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: RAPID - PHP Close Tag Not Required

Postby Will Fastie » Wed May 02, 2018 2:47 pm

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: 136
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA

Re: RAPID - PHP Close Tag Not Required

Postby Will Fastie » Tue May 15, 2018 8:07 am

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
Will Fastie
 
Posts: 136
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA

Re: RAPID - PHP Close Tag Not Required

Postby Aivars » Tue May 15, 2018 10:44 am

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
Aivars
Blumentals Software Developer
 
Posts: 2284
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: RAPID - PHP Close Tag Not Required

Postby Will Fastie » Wed May 16, 2018 6:43 pm

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
User avatar
Will Fastie
 
Posts: 136
Joined: Mon Jan 31, 2005 6:47 pm
Location: Timonium, MD USA


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Feature Requests

Who is online

Users browsing this forum: Bing [Bot] and 4 guests