-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Replace <?php echo with <?= #2596
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
Conversation
Generated with:
find . -type f -print0 | xargs -0 sed -i s"/<.php echo /<?= /g"
|
👍 |
|
👎 I like |
|
👍 |
|
I think the less reasons we have to put "<?php" the better. We should identify the common cases where we use control structures and minimize them |
|
👍 |
|
I like this as well. Less typing is nice. |
|
#2588 Is so much merge fun now.. =D |
|
Such conflicts. |
|
👍 |
|
Related/Questions: b.) As of now there seems to be an inconsistency for the closing semi-colon I suggest to keep things as dense as possible cause PHP tends to be verbose anyway: As a related question: Has it been discussed when to use |
|
It would be So I'd go for |
|
@ionas I think it trims new lines when outputting, or adds the newline |
|
So there is an agreement for the white spaces (to keep them in) for both short echos and alternative syntax for control structures. Currently (also in this commit) though there is still a mix of adding the last tailing Examples: I'd purpose to omit the last tailing semicolon within layouts, views and bake results. @lorenzo Related: When to use Alternate Controle Syntax? |
Adopt this convenience since 5.4 makes it possible on all supported installs.
Should not be merged before #2588 (at which point this will need regenerating).