Hello,
On Tue, 12 Mar 2019 at 10:51, Rowan Collins <rowan.coll...@gmail.com> wrote:
>
> On Mon, 11 Mar 2019 at 20:06, G. P. B. <george.bany...@gmail.com> wrote:
>
> > From my understanding, the `<?` tag is not available without the directive,
> > so maybe we should deprecate PHP's short tag altogether?
> >
>
>
> I think when that's been proposed in the past, people have said they like
> it for use in simple templates, often along with the "alternative control
> structures", e.g.:
>
> <? foreach ( $things as $thing ): ?>
> <? if ( $thing->quantity > 1 ): ?><p><?= $thing->description; ?></p><?
> endif; ?>
> <? endforeach; ?>
>
> I couldn't find any discussions for a few years, though, so it's possible
> opinions have changed.
>
> Regards,
> --
> Rowan Collins
> [IMSoP]

PHP based template engines today most likely use only <?php and <?=
because of this topic today exactly. Possibility of being deprecated
:) I think the short opening tags are good to go so things are more
simple.

A side question is there any plan to move the idea of removing opening
<?php tag for PHP only files or is this off topic here? PHP has long
moved out of the template engines world and left that task to more
dedicated so called compiled or parsed template engines (such as Twig
or Blade), so maybe something to think about as well.

-- 
Peter Kokot

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to