Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PHP closing tags #979

Closed
DiogoParrinha opened this issue Jul 20, 2014 · 9 comments
Closed

Remove PHP closing tags #979

DiogoParrinha opened this issue Jul 20, 2014 · 9 comments
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:enhancement Type: Enhancement. Contains minor improvements
Milestone

Comments

@DiogoParrinha
Copy link
Contributor

18fcbe8#commitcomment-7073774
Quote:

Wouldn't hurt to take the ?> out of most MyBB files entirely...
http://php.net/manual/en/language.basic-syntax.phptags.php
If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file.
@DiogoParrinha DiogoParrinha added this to the 1.8.0 milestone Jul 20, 2014
@DiogoParrinha DiogoParrinha self-assigned this Jul 20, 2014
@Sama34
Copy link
Contributor

Sama34 commented Jul 20, 2014

I think we can do this together with the typecast one, so we can push it in beta 3.

@DiogoParrinha
Copy link
Contributor Author

I can write a script to do this too yes.

@DiogoParrinha DiogoParrinha modified the milestones: 1.8 Beta 3, 1.8.0 Jul 20, 2014
@Sama34
Copy link
Contributor

Sama34 commented Jul 20, 2014

If a file is pure PHP code [...]

Does it means it wouldn't work if in-line HTML is used? There are some files that do, that should be easy to fix.

@euantorano
Copy link
Member

Yes, it does mean that Omar.

I'm completely for this. It is a well known best practise, but I'm sure there used to be a style guideline against it.

On 20 Jul 2014, at 21:54, Omar Gonzalez notifications@github.com wrote:

If a file is pure PHP code

Does it means it wouldn't work if in-line HTML is used? There are some files that do, we can fix that too.


Reply to this email directly or view it on GitHub.

@Sama34
Copy link
Contributor

Sama34 commented Jul 20, 2014

http://docs.mybb.com/Development_Standards.html#PHP_Code_Demarcation

It was decided last year we wouldn't be removing them. But half that page is ignored anyways and there is nothing actually wrong with this, is it?

@DiogoParrinha
Copy link
Contributor Author

Yes, some files that contain inline HTML (especially in the ACP). The script I'll create will need to check that.

@Sama34
Copy link
Contributor

Sama34 commented Jul 21, 2014

I can update those so the script simply removes the endings. I even think this can be done manually :P

It is not like the typecast one that checks for multiple instances.

DiogoParrinha pushed a commit that referenced this issue Jul 21, 2014
@DiogoParrinha
Copy link
Contributor Author

This is done.

DiogoParrinha pushed a commit that referenced this issue Jul 21, 2014
avril-gh added a commit to avril-gh/mybb that referenced this issue Aug 20, 2014
PHP closing tags was still created in various places.
@avril-gh
Copy link
Contributor

php closing tags still re-created in various places.
#1276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:enhancement Type: Enhancement. Contains minor improvements
Projects
None yet
Development

No branches or pull requests

4 participants