-
Notifications
You must be signed in to change notification settings - Fork 26
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
Opening PHP tag in uppercase #91
Comments
I know Greg was always very very strict about enforcing the PSRs to the letter (and nothing else). I also know he often asked for clarification in the FIG Google group/mailing list. ;-) |
Good idea. |
In my opinion it doesn't really benefit readability to specify a casing for PHP tags so we should leave it unspecified. |
The intent of a style guide isn't just readability, but consistency. I don't recall the last time I saw a capitalized PHP open tag. So making it required that everyone do what everyone is already doing seems reasonable. |
PER CS, 2.1 Basic Coding Standard:
PSR-1, 1. Overview
I think, PSR-1 explicitly defines |
@vjik As far as I know, that rule is about the type of open tags and basically forbids the use of Keep in mind that PSR1 was published in the PHP 5 era. |
But if it is not obvious and can be misleading, then better explicitly state it. |
None of the PSRs for Coding Standards, nor PER-CS, explicitly indicate whether the opening tag for PHP should be in lowercase, though this is very much implied in PSR-1 - see https://www.php-fig.org/psr/psr-1/#1-overview
It probably should be explicitly stated in the next version of PER-CS.
Also, it should be noted that php-cs-fixer does force the opening tag to be in lowercase, whilst phpcs does not.
The text was updated successfully, but these errors were encountered: