Re: Deprecate short_open_tag ini directive?

From: Date: Mon, 25 Mar 2019 16:20:51 +0000
Subject: Re: Deprecate short_open_tag ini directive?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-104944@lists.php.net to get a copy of this message
For the record, we're a mid-size organization, building a modern product on PHP 7 with a PSR-based stack. We've shunned template engines and rely heavily on short open tags and alternative control-structures - mainly because we insist on static analysis and IDE support, which we get by manually type-hinting a single view-model variable $view at the beginning of each template. No other template engine gives us what we want in terms of static analysis, type-checking or IDE support. The choice to rebuild a very large product in PHP vs e.g. Node, at the time, was in part motivated by PHP's template features - which, while it may look pretty verbose and ugly on the surface, has a huge advantage over basically anything else, e.g. static analysis with various QA tools, automated refactorings (rename etc.) in PHP Storm, and so on. The loss of this feature would be a substantial setback for our organization - for which there is no really good replacement. On Tue, Mar 12, 2019 at 10:51 AM Rowan Collins <rowan.collins@gmail.com> wrote: > On Mon, 11 Mar 2019 at 20:06, G. P. B. <george.banyard@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] >

« previous php.internals (#104944) next »