# Regarding the echo short tag

- Thread: https://externals.io/message/52447
- Original archive: https://news-web.php.net/php.internals/52447
- Started by dukeofgaming on 2011-05-18T18:10:43+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #52447 — dukeofgaming — 2011-05-18T18:10:43+00:00

URL: https://externals.io/message/52447#52447

Hi,

I just wanted to ask what is the community's feeling on keeping the echo
shortcut. I know short tags are kind of deprecated and I think it is the
right call, however, I really really think the echo shortcut <?= should be
kept regardless of plain short tags, which are kind of pointless. I've read
the RFC regarding this and I think the second + third option are the only
sane ones.

Regarding syntax, I do like <?:$var and would maybe also advocate for
<%=$var or <% $var. I think  another option could be a valid namespaced XML
notation <php:var /> (which is still shorter than <?php echo $var?>), but
maybe this later has bigger implications that I'm too stupid right now to
realize (for better or worse).

I'm personally still using them since the benefit and enjoyment of working
them supersedes the worst case scenario, which is a global find & replace of
<?= to <?php echo. I tell my coworkers to enjoy them while they still can,
however this is a luxury that can be only had with custom development, not
open-source projects due to the obvious problems with portability given that
short_open_tags is now off by default.

Best regards,

David Vega

---

## #52448 — Ferenc Kovacs — 2011-05-18T18:16:51+00:00

URL: https://externals.io/message/52447#52448 · In reply to: #52447

> Hi,
>
> I just wanted to ask what is the community's feeling on keeping the echo
> shortcut. I know short tags are kind of deprecated and I think it is the
> right call, however, I really really think the echo shortcut <?= should be
> kept regardless of plain short tags, which are kind of pointless. I've read
> the RFC regarding this and I think the second + third option are the only
> sane ones.
>
> Regarding syntax, I do like <?:$var and would maybe also advocate for
> <%=$var or <% $var. I think  another option could be a valid namespaced XML
> notation <php:var /> (which is still shorter than <?php echo $var?>), but
> maybe this later has bigger implications that I'm too stupid right now to
> realize (for better or worse).
>
> I'm personally still using them since the benefit and enjoyment of working
> them supersedes the worst case scenario, which is a global find & replace of
> <?= to <?php echo. I tell my coworkers to enjoy them while they still can,
> however this is a luxury that can be only had with custom development, not
> open-source projects due to the obvious problems with portability given that
> short_open_tags is now off by default.
>
> Best regards,
>
> David Vega
>

I thought we alredy decided to keep the short echo.

Tyrael

---

## #52449 — dukeofgaming — 2011-05-18T18:33:26+00:00

URL: https://externals.io/message/52447#52449 · In reply to: #52448

Should this go in "Accepted" then?.

Regards,

David



> 
> > […]
> be
> > […]
> read
> > […]
> XML
> > […]
> working
> > […]
> of
> > […]
> can,
> > […]
> not
> > […]
> that
> > […]
>
> I thought we alredy decided to keep the short echo.
>
> Tyrael
