-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
replace occurrences of <?php echo with <?= #6664
Conversation
<?= now a first class citizen of PHP code <?= nicely equates to {{ }} in Twig - i.e. output string casting of expression leaving <?php logic blocks to equate to Twig {% .. matt ..
I'm divided about this proposal. I like it and I think it's better ... but it would require us to change lots of PHP examples in the entire documentation and this However, Symfony 2.7 and 2.8 still require PHP >= 5.3.9, so this would require us to introduce a lot of differences between the doc versions. I don't know if it's worth it. |
As the examples you change here are examples of how you might have written code before using Symfony I think we can still stick with the old syntax. |
I'm 👍 on this PR. I think we should also do it in the rest of the docs:
|
okay .. matt .. On Jun 21, 2016, at 07:58 AM, Christian Flothmann notifications@github.com wrote: As the examples you change here are examples of how you might have written code before using Symfony I think we can still stick with the old syntax. |
ping @xabbuh @javiereguiluz @weaverryan can we please decide what we do with this? |
I change my vote from -1 to +0 😄 |
I don't care too much. So this gets a +0 from me. Feel free to merge, Wouter. :) |
Status: reviewed |
Thanks Matt! |
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #6664). Discussion ---------- replace occurrences of <?php echo with <?= ```<?=``` now a first class citizen of PHP code ```<?=``` nicely equates to ```{{ }}``` in Twig - i.e. output string casting of expression leaving ```<?php``` logic blocks to equate to Twig ```{%``` .. matt .. Commits ------- 198ab4a replace occurrences of <?php echo with <?=
This PR was merged into the 3.4 branch. Discussion ---------- [Syntax] Change to short php echo tags Changed occurrences of `<?php echo` to `<?=`, see discussion about this topic here: #6664 Targeted 3.4 because 2.8 requires PHP 5.3.9 at minimum while the short PHP echo tags are enabled by default at PHP 5.4. Commits ------- e3cc3de Change to short php echo tags
<?=
now a first class citizen of PHP code<?=
nicely equates to{{ }}
in Twig - i.e. output string casting of expressionleaving
<?php
logic blocks to equate to Twig{%
.. matt ..