dropping asp_tags in HEAD

php.internals

Antony Dovgal

19 years ago
Hello all. If there are no objections, I'm going to drop asp_tags in HEAD tomorrow. You can see the patch here: http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff
-- Wbr, Antony Dovgal

Edin Kadribasic

19 years ago
Antony Dovgal wrote:
> Hello all. > > If there are no objections, I'm going to drop asp_tags in HEAD tomorrow. > You can see the patch here: > http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff
Big objection from here. See my other email. Discussed and agreed against removing tags since that creates 0% gain and much pain for some people. Edin

Antony Dovgal

19 years ago
On 04/12/2007 11:39 PM, Edin Kadribasic wrote:
> Antony Dovgal wrote: >> Hello all. >> >> If there are no objections, I'm going to drop asp_tags in HEAD tomorrow. >> You can see the patch here: >> http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff > > Big objection from here. See my other email.
Please point me to the discussion.
> Discussed and agreed against removing tags since that creates 0% gain > and much pain for some people.
I'm sure using an option which is Off by default have been causing a lot of pain for them all these years, so it's time to fix the app and forget.
-- Wbr, Antony Dovgal

Stut

19 years ago
Antony Dovgal wrote:
> On 04/12/2007 11:39 PM, Edin Kadribasic wrote: >> Antony Dovgal wrote: >>> Hello all. >>> >>> If there are no objections, I'm going to drop asp_tags in HEAD tomorrow. >>> You can see the patch here: >>> http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff >> >> Big objection from here. See my other email. > > Please point me to the discussion. > >> Discussed and agreed against removing tags since that creates 0% gain >> and much pain for some people. > > I'm sure using an option which is Off by default have been causing a lot > of pain for them all these years, so it's time to fix the app and forget.
Yeah, one setting in php.ini against any number of tags in any number of scripts. Now that's what I call a reasoned argument. -Stut

Antony Dovgal

19 years ago
On 04/13/2007 12:01 AM, Stut wrote:
>> I'm sure using an option which is Off by default have been causing a lot >> of pain for them all these years, so it's time to fix the app and forget. > > Yeah, one setting in php.ini against any number of tags in any number of > scripts. Now that's what I call a reasoned argument.
Surely we must to keep a setting just because two people in the world use it. I'm afraid their apps won't run on PHP6 anyway because of numerous major changes (already done and still planned), so one more cleanup won't hurt anyone.
-- Wbr, Antony Dovgal

Steph

19 years ago
> Surely we must to keep a setting just because two people in the world use > it. > I'm afraid their apps won't run on PHP6 anyway because of numerous major > changes (already done and still planned), so one more cleanup won't hurt > anyone.
I'm going to come back from the dead to argue with you Tony, even though I hate that tag already. http://devzone.zend.com/node/view/id/1465#Heading2 - the last time this came up. http://devzone.zend.com/node/view/id/337#Heading1 - the first time this came up. Note that both Rasmus and Zeev were against making the change in PHP 5 back then. Did something change? - Steph

Richard Lynch

19 years ago
On Thu, April 12, 2007 3:12 pm, Antony Dovgal wrote:
> Surely we must to keep a setting just because two people in the world > use it. > I'm afraid their apps won't run on PHP6 anyway because of numerous > major changes > (already done and still planned), so one more cleanup won't hurt > anyone.
What is the benefit to dropping these things? I've never quite understood the impetus behind losing short tags and asp tags...
-- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

Robert Deaton

19 years ago
On 4/12/07, Richard Lynch <ceo@l-i-e.com> wrote:
> On Thu, April 12, 2007 3:12 pm, Antony Dovgal wrote: > > Surely we must to keep a setting just because two people in the world > > use it. > > I'm afraid their apps won't run on PHP6 anyway because of numerous > > major changes > > (already done and still planned), so one more cleanup won't hurt > > anyone. > > What is the benefit to dropping these things? > > I've never quite understood the impetus behind losing short tags and > asp tags...
I understand the need to remove short tags. Here's the reason: <?xml. As for ASP tags, I don't really know.
-- --Robert Deaton

Richard Lynch

19 years ago
On Thu, April 12, 2007 6:00 pm, Robert Deaton wrote:
> I understand the need to remove short tags. Here's the reason: <?xml.
That's it? I mean, we've co-existed with <?xml just fine for some time now, allowing users to choose short_tags or XML, but not both, by setting php.ini up the way they want... Doesn't seem like reason enough to me to yank it. [shrug]
-- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

Stefan Walk

19 years ago
On 12/04/07, Antony Dovgal <antony@zend.com> wrote:
> Surely we must to keep a setting just because two people in the world use it. > I'm afraid their apps won't run on PHP6 anyway because of numerous major changes > (already done and still planned), so one more cleanup won't hurt anyone.
This isn't cleanup. This is dropping a feature without a similar alternative. Short tags are problematic because of xhtml templates. ASP tags collide with no (x)html markup, and they are short and easy to type/read in templates. Regards, Stefan

Tomas Kuliavas

19 years ago
>> Surely we must to keep a setting just because two people in the world >> use it. >> I'm afraid their apps won't run on PHP6 anyway because of numerous major >> changes >> (already done and still planned), so one more cleanup won't hurt anyone. > > This isn't cleanup. This is dropping a feature without a similar > alternative. Short tags are problematic because of xhtml templates. > ASP tags collide with no (x)html markup, and they are short and easy > to type/read in templates.
ASP tags do collide with some html markup. <td width=10%> Boom. I know. Value should be quoted. 'asp_tags = on' is yet another way to break php scripts. Some developers don't expect it and make typos in html attributes.
-- Tomas

Matt W

19 years ago
Hi Tomas, ----- Original Message ----- From: "Tomas Kuliavas" Sent: Friday, April 13, 2007
> ASP tags do collide with some html markup. > > <td width=10%> > > Boom.
That's not a problem. :-) If you're in PHP, that would be a string; if in HTML, %> isn't an opening tag: php -d asp_tags=On -r "echo '<td width=10%>'%>, <td width=10%>" Result: <td width=10%>, <td width=10%>
> I know. Value should be quoted. 'asp_tags = on' is yet another way to > break php scripts. Some developers don't expect it and make typos in html > attributes. > > -- > Tomas
Matt

Tomas Kuliavas

19 years ago
> Hi Tomas, > > ----- Original Message ----- > From: "Tomas Kuliavas" > Sent: Friday, April 13, 2007 > >> ASP tags do collide with some html markup. >> <td width=10%> >> Boom. > > That's not a problem. :-) If you're in PHP, that would be a string; if
in
> HTML, %> isn't an opening tag: > > php -d asp_tags=On -r "echo '<td width=10%>'%>, <td width=10%>" > > Result: <td width=10%>, <td width=10%> >
I do remember that it broke things in some php version. Reported about SquirrelMail issues on asp_tags=on setup in 2001. Maybe it was in php 4.1.2. Can't reproduce it right now.
-- Tomas

Stefan Walk

19 years ago
On 13/04/07, Tomas Kuliavas <tokul@users.sourceforge.net> wrote:
> >> Surely we must to keep a setting just because two people in the world > >> use it. > >> I'm afraid their apps won't run on PHP6 anyway because of numerous major > >> changes > >> (already done and still planned), so one more cleanup won't hurt anyone. > > > > This isn't cleanup. This is dropping a feature without a similar > > alternative. Short tags are problematic because of xhtml templates. > > ASP tags collide with no (x)html markup, and they are short and easy > > to type/read in templates. > > ASP tags do collide with some html markup. > > <td width=10%> > > Boom. > > I know. Value should be quoted. 'asp_tags = on' is yet another way to > break php scripts. Some developers don't expect it and make typos in html > attributes.
Not "should be", it is a must. Quoting HTML 4.01: "In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58)." So, your example is not HTML, so it doesn't show any collision.

Ron Korving

19 years ago
""Stefan Walk"" <stefan.walk@gmail.com> schreef in bericht news:4858f9d90704130213h4b440ac4w7518943b10627439@mail.gmail.com...
> On 13/04/07, Tomas Kuliavas <tokul@users.sourceforge.net> wrote: >> >> Surely we must to keep a setting just because two people in the world >> >> use it. >> >> I'm afraid their apps won't run on PHP6 anyway because of numerous >> >> major >> >> changes >> >> (already done and still planned), so one more cleanup won't hurt >> >> anyone. >> > >> > This isn't cleanup. This is dropping a feature without a similar >> > alternative. Short tags are problematic because of xhtml templates. >> > ASP tags collide with no (x)html markup, and they are short and easy >> > to type/read in templates. >> >> ASP tags do collide with some html markup. >> >> <td width=10%> >> >> Boom. >> >> I know. Value should be quoted. 'asp_tags = on' is yet another way to >> break php scripts. Some developers don't expect it and make typos in html >> attributes. > > Not "should be", it is a must. Quoting HTML 4.01: "In certain cases, > authors may specify the value of an attribute without any quotation > marks. The attribute value may only contain letters (a-z and A-Z), > digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), > underscores (ASCII decimal 95), and colons (ASCII decimal 58)." > > So, your example is not HTML, so it doesn't show any collision.
Actually it does, since browsers aren't as strict as the standards they "implement". The only real reason I can think of to remove ASP tags, would be to unclutter php.ini. As has often been mentioned here in internals, there is such a thing as "too much features". Apparently that goes for things like OO and typehinting, and as far as I'm concerned it also goes for php.ini (which is also why magic_quotes are being removed altogether right?). If that reason (and the tinyest speed improvement in PHP when it searches for an open tag) is not enough reason, then I guess it's better kept in. Just my ?0.02 - Ron

Stefan Walk

19 years ago
On 13/04/07, Ron Korving <r.korving@xit.nl> wrote:
> Actually it does, since browsers aren't as strict as the standards they > "implement".
Well, then ?> collides also. So the suggestion is to drop everything but <script language="php">? ;) Aside from that, Matt already mentioned that it doesn't really break. Regards, Stefan

Chad Daelhousen

19 years ago
Ron Korving wrote:
> (which is also why magic_quotes are being removed altogether > right?).
No, magic_quotes should be removed because they're dumb. The first thing anyone does when writing portable PHP code is to filter all their input through stripslashes() if magic_quotes is on, and then what has anyone gained?
-- Chad Daelhousen I've been programming for about 15 years, but it's only in the last couple that I've come to a real understanding of it all.

Edin Kadribasic

19 years ago
Antony Dovgal wrote:
> On 04/12/2007 11:39 PM, Edin Kadribasic wrote: >> Antony Dovgal wrote: >>> Hello all. >>> >>> If there are no objections, I'm going to drop asp_tags in HEAD tomorrow. >>> You can see the patch here: >>> http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff >> >> Big objection from here. See my other email. > > Please point me to the discussion. > >> Discussed and agreed against removing tags since that creates 0% gain >> and much pain for some people. > > I'm sure using an option which is Off by default have been causing a lot > of pain for them all these years, so it's time to fix the app and forget.
See the discussion around this post: http://www.zend.com/lists/php-dev/200511/msg00938.html Removing this tags causes pain to some (very small number of) people but it gives nothing to the rest. Edin

Ilia A.

19 years ago
IMO there is little to gain by dropping support for <%, it only risks breaking scripts relying on out. On 12-Apr-07, at 3:32 PM, Antony Dovgal wrote:
> Hello all. > > If there are no objections, I'm going to drop asp_tags in HEAD > tomorrow. > You can see the patch here: > http://tony2001.phpclub.net/dev/tmp/kill_asp_tags.diff > > -- > Wbr, Antony Dovgal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >
Ilia Alshanetsky

Andi Gutmans

19 years ago
Not that I think many people use this but I think there's absolutely nothing to gain from dropping this tag (except for purity). So I really so no good reason to do it.