# Option to enable echo tags when short tags are turned off

- Thread: https://externals.io/message/50137
- Original archive: https://news-web.php.net/php.internals/50137
- Started by Galen Wright-Watson on 2010-11-11T02:20:40+00:00
- Messages: 7
- 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

---

## #50137 — Galen Wright-Watson — 2010-11-11T02:20:40+00:00

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

At the beginning of the year, someone put in a request for an option
to enable echo tags when short tags are disabled
(http://bugs.php.net/bug.php?id=50662). I've written a patch and two
tests for the feature, and am looking for feedback and a developer to
incorporate it into PHP 5.3 and 6. What do others think of the
feature? Is there a developer willing to apply it to the codebase? The
patch doesn't target the most recent source revision. If it won't
patch the current sources, let me know and I'll update it.

---

## #50193 — Stas Malyshev — 2010-11-15T01:43:32+00:00

URL: https://externals.io/message/50137#50193 · In reply to: #50137

Hi!

> At the beginning of the year, someone put in a request for an option
> to enable echo tags when short tags are disabled
> (http://bugs.php.net/bug.php?id=50662). I've written a patch and two

I don't think we really need more options - I think we should just have 
<?= always work. There's no valid XML file out there that contains <?= 
and only people that use it are PHP programmes that don't care for XML 
validity. Why not just make it work finally?
Yes, I know that was debated 100 times. But I still think disabling <?= 
makes no sense, so here it goes.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #50194 — Rasmus Lerdorf — 2010-11-15T02:37:17+00:00

URL: https://externals.io/message/50137#50194 · In reply to: #50193

> Hi!
> 
> > […]
> 
> I don't think we really need more options - I think we should just have
> <?= always work. There's no valid XML file out there that contains <?=
> and only people that use it are PHP programmes that don't care for XML
> validity. Why not just make it work finally?
> Yes, I know that was debated 100 times. But I still think disabling <?=
> makes no sense, so here it goes.

Yup, I agree.  I see no reason to kill <?=

-R

---

## #50195 — Gustavo Lopes — 2010-11-15T02:44:48+00:00

URL: https://externals.io/message/50137#50195 · In reply to: #50194

On Mon, 15 Nov 2010 02:37:17 -0000, Rasmus Lerdorf <rasmus@lerdorf.com>  
wrote:

> 
> > […]
>
> Yup, I agree.  I see no reason to kill <?=
>

The problem with <?= is that more often that not, you need to run the text  
through htmlentities or similar, so it would be of very limited usefulness  
even if it could be relied on (i.e. it always worked).

-- 
Gustavo Lopes

---

## #50196 — Rasmus Lerdorf — 2010-11-15T02:49:09+00:00

URL: https://externals.io/message/50137#50196 · In reply to: #50195

> On Mon, 15 Nov 2010 02:37:17 -0000, Rasmus Lerdorf <rasmus@lerdorf.com>
> wrote:
> 
> > […]
> 
> The problem with <?= is that more often that not, you need to run the
> text through htmlentities or similar, so it would be of very limited
> usefulness even if it could be relied on (i.e. it always worked).

That's a very different issue and has nothing to do with whether <?=
should be there or not.  In most templating/views the variables exposed
to that part have already been filtered for display purposes.

In my stuff, for example, I always have the "full_special_chars" default
filter in place, so all user-derived variables are automatically safe.

-Rasmus

---

## #50197 — Stas Malyshev — 2010-11-15T02:49:52+00:00

URL: https://externals.io/message/50137#50197 · In reply to: #50195

Hi!

> The problem with<?= is that more often that not, you need to run the text
> through htmlentities or similar, so it would be of very limited usefulness
> even if it could be relied on (i.e. it always worked).

So, you say <?= is not useful in certain cases. I agree. There are 
plenty of cases where it *is* useful and since restricting it obviously 
did nothing to discourage its use and only added annoyance to the life 
of average php programmer, I'd say let's get rid of that annoyance. I 
see benefits, I see no cost, the case seems obvious. Anybody can make a 
case for not fixing <?= in 5.4 to finally work regardless of ini settings?
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #50198 — Will Fitch — 2010-11-15T02:52:08+00:00

URL: https://externals.io/message/50137#50198 · In reply to: #50194

+1



> 
> > […]
>
> Yup, I agree.  I see no reason to kill <?=
>
> -R
>
> --
> 
> 
>
>


-- 

Thanks,

Will Fitch
Director of Operations | Quepasa.com
931.205.8242 | will.fitch@quepasacorp.com
Twitter: twitter.com/willfitch
