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
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 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.diffBig 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
Antony Dovgal 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.diffBig 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
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
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
--
Wbr, Antony Dovgal
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?
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
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?
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
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
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
Hi Tomas,
----- Original Message -----
From: "Tomas Kuliavas"
Sent: Friday, April 13, 2007ASP 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
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.
""Stefan Walk"" stefan.walk@gmail.com schreef in bericht
news:4858f9d90704130213h4b440ac4w7518943b10627439@mail.gmail.com...
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
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
Well, then ?> collides also. So the suggestion is to drop everything
but <script language="php">? ;)
To be really compliant this should be <script type="text/php"> or some other
content-type :)
Uwe
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.
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.
Tijnema
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.
There are actually people running both PHP and ASP in series to
generate HTML?
If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...
--
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?
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...
I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.
Tijnema
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.
That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
--
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Carlos - SP/Brazil
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...
<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
And let me stress that this is something we're forcing people to do
when they're on a short tags enabled server... It's not something
they're allowed to do at free will... PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...
Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If
ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
PHP was never meant to win any beauty contests, nor to enforce
standards. If you want to take your argument to its logical conclusion
then you have to also take the next step and not allow literal entities
inside the PHP blocks, because that is also not standards compliant.
That means you cannot write:
<?php if($a > 10) foo() ?>
You would have to change it to:
<?php if($a > 10) foo() ?>
And that's just a simple example of that.
-Rasmus
Bart de Boer wrote:
And let me stress that this is something we're forcing people to do
when they're on a short tags enabled server... It's not something
they're allowed to do at free will... PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If
ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
I feel I can't disagree with my hero. :) But is that really so?
The XML spec says:
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
Doesn't Char* mean any char?
All the parsers seem to accept '>' inside PI's without problems too.
Furthermore... PHP may not be the most beautiful of languages... But
that doesn't mean it has to be ugly...
-Bart
Rasmus Lerdorf wrote:
PHP was never meant to win any beauty contests, nor to enforce
standards. If you want to take your argument to its logical conclusion
then you have to also take the next step and not allow literal entities
inside the PHP blocks, because that is also not standards compliant.
That means you cannot write:<?php if($a > 10) foo() ?>
You would have to change it to:
<?php if($a > 10) foo() ?>
And that's just a simple example of that.
-Rasmus
Bart de Boer wrote:
And let me stress that this is something we're forcing people to do
when they're on a short tags enabled server... It's not something
they're allowed to do at free will... PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? IfASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outside
their own little world...
I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
Maybe I'm missing something here, but why should PHP be compliant with a
standard that absolutely has nothing to do with the language (c.f.: XML) ?
Isn't it obvious that a file with the extension .php is NOT an XML file ? It
seems to me the short tags issue is starting to become a bikeshed
argument...
Again, sorry if I'm missing the point.
I feel I can't disagree with my hero. :) But is that really so?
The XML spec says:
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
Doesn't Char* mean any char?
All the parsers seem to accept '>' inside PI's without problems too.
Furthermore... PHP may not be the most beautiful of languages... But
that doesn't mean it has to be ugly...-Bart
Rasmus Lerdorf wrote:
PHP was never meant to win any beauty contests, nor to enforce
standards. If you want to take your argument to its logical conclusion
then you have to also take the next step and not allow literal entities
inside the PHP blocks, because that is also not standards compliant.
That means you cannot write:<?php if($a > 10) foo() ?>
You would have to change it to:
<?php if($a > 10) foo() ?>
And that's just a simple example of that.
-Rasmus
Bart de Boer wrote:
And let me stress that this is something we're forcing people to do
when they're on a short tags enabled server... It's not something
they're allowed to do at free will... PHP's convention is currently
responsible for people creating non-standards-compliant documents...
And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags
is
our business...Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor
dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix
XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? IfASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outside
their own little world...
I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can
only
interfere with ASP.Tijnema
--
--
--
Nicolas Bérard-Nault (nicobn@gmail.com)
Étudiant D.E.C. Sciences, Lettres & Arts
Cégep de Sherbrooke
Page personnelle: http://nicobn.googlepages.com
Maybe I'm missing something here, but why should PHP be compliant
with a
standard that absolutely has nothing to do with the language (c.f.:
XML) ?
Isn't it obvious that a file with the extension .php is NOT an XML
file ? It
seems to me the short tags issue is starting to become a bikeshed
argument...Again, sorry if I'm missing the point.
Say you want PHP to produce XML output in a template like fashion:
<?xml ...>
<user>
<name><%= $username %></name>
<zip><%= $zip %></zip>
</user>
Now to me personally this looks very neat and allows for code/
presentation separation, in this case presentation being XML output.
You cannot do this with short tags enabled because PHP will throw a
parse error on line one.
So you have two options: enable asp tags and use it as above, or use:
<name><?php echo $username?></name>
syntax.
It comes down to taste, and to my eye the version with asp tags looks
more readable when you use PHP in this way.
Edin
Bart de Boer wrote:
I feel I can't disagree with my hero. :) But is that really so?
The XML spec says:
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
Doesn't Char* mean any char?
All the parsers seem to accept '>' inside PI's without problems too.
If you pick your standards carefully, sure. ;)
I chose the PHP syntax before there was an XML spec. Back in the dark
ages where HTML was defined as an SGML DTD. In SGML-speak <? is a
general delimiter called PIO, < is STAGO and > is PIC. In those early
HTML DTD's you couldn't have a PIO element that contained STAGO or PIC.
ISO-8879 has all the uglyness in it if you want to dig a bit, but even
with that it doesn't really tell the whole story of the conditions at
the time.
The point being that it was a conscious decision to not try to strictly
comply with the specification at the time or to write a PHP DTD, but
instead to focus on convenience first and the spec second. You still
have plenty of things you can do today that doesn't match modern XML
specs. For example:
<?php echo '?>'; ?>
Or anything with ctrl chars in it. You can put a literal 0x07 char in a
quoted string, for example, and PHP will happily pass that through, but
that is also not allowed in the spec.
-Rasmus
I think Rasmus summarized pretty well the essence of the initial decision
that was made to include short tags. After getting all these precisions, I'm
more inclined to the statut quo side, not that my opinion really matters,
but I just feel there is no consensus right now and that this discussion
runs into an obvious dead-end. What are we gaining by removing short tags ?
Obviously nothing. What are we losing ? A lot of people demonstrated the
usefulness, may it be limited, of the asp/short tags hence I feel we will
lose something.
Purity in itself may be an argument, but not in a language that deems itself
pragmatic.
My 2 cents.
Bart de Boer wrote:
I feel I can't disagree with my hero. :) But is that really so?
The XML spec says:
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
Doesn't Char* mean any char?
All the parsers seem to accept '>' inside PI's without problems too.
If you pick your standards carefully, sure. ;)
I chose the PHP syntax before there was an XML spec. Back in the dark
ages where HTML was defined as an SGML DTD. In SGML-speak <? is a
general delimiter called PIO, < is STAGO and > is PIC. In those early
HTML DTD's you couldn't have a PIO element that contained STAGO or PIC.
ISO-8879 has all the uglyness in it if you want to dig a bit, but even
with that it doesn't really tell the whole story of the conditions at
the time.The point being that it was a conscious decision to not try to strictly
comply with the specification at the time or to write a PHP DTD, but
instead to focus on convenience first and the spec second. You still
have plenty of things you can do today that doesn't match modern XML
specs. For example:<?php echo '?>'; ?>
Or anything with ctrl chars in it. You can put a literal 0x07 char in a
quoted string, for example, and PHP will happily pass that through, but
that is also not allowed in the spec.-Rasmus
--
--
Nicolas Bérard-Nault (nicobn@gmail.com)
Étudiant D.E.C. Sciences, Lettres & Arts
Cégep de Sherbrooke
Page personnelle: http://nicobn.googlepages.com
I think those exceptions would be acceptable for now. I like the concept
of an XML document that contains PHP code. Just like you have XML
documents that contain Javascript code. I think they should be parsable.
Since PHP was made for the web, I think we should try to obey the rules
of the web as much as possible.
But that's just me. :) I understand it will be tough to banish short
tags all together since so much code depends on it. Losing the ASP style
tags is a step in the right direction at least.
... And now I'm gonna drink too much beer! Wishing everyone a great
weekend!
-Bart
Rasmus Lerdorf wrote:
Bart de Boer wrote:
I feel I can't disagree with my hero. :) But is that really so?
The XML spec says:
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
Doesn't Char* mean any char?
All the parsers seem to accept '>' inside PI's without problems too.
If you pick your standards carefully, sure. ;)
I chose the PHP syntax before there was an XML spec. Back in the dark
ages where HTML was defined as an SGML DTD. In SGML-speak <? is a
general delimiter called PIO, < is STAGO and > is PIC. In those early
HTML DTD's you couldn't have a PIO element that contained STAGO or PIC.
ISO-8879 has all the uglyness in it if you want to dig a bit, but even
with that it doesn't really tell the whole story of the conditions at
the time.The point being that it was a conscious decision to not try to strictly
comply with the specification at the time or to write a PHP DTD, but
instead to focus on convenience first and the spec second. You still
have plenty of things you can do today that doesn't match modern XML
specs. For example:<?php echo '?>'; ?>
Or anything with ctrl chars in it. You can put a literal 0x07 char in a
quoted string, for example, and PHP will happily pass that through, but
that is also not allowed in the spec.-Rasmus
Am Samstag, 14. April 2007 11:49 schrieb Bart de Boer:
PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...
About which standard are you talking?
Regards,
Oliver
Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? IfASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outside
their own little world...
I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
The XML standard...
HTML 4.01 compliance seems a bit trivial since there's already so much
forgiveness going on around that spec anyway...
Oliver Block wrote:
Am Samstag, 14. April 2007 11:49 schrieb Bart de Boer:
PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...About which standard are you talking?
Regards,
Oliver
Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If
ASP runsfirst then there isn't a problem, but if PHP runs first, it would
execute the ASP code.
There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outsidetheir own little world...
I've seen such code on the net some time ago...But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
Hello Bart,
HTML is an SGML application while XHTML is an XML application. And XML is
basically a subset of SGML...
best regards
marcus
Sunday, April 15, 2007, 12:30:01 PM, you wrote:
The XML standard...
HTML 4.01 compliance seems a bit trivial since there's already so much
forgiveness going on around that spec anyway...
Oliver Block wrote:
Am Samstag, 14. April 2007 11:49 schrieb Bart de Boer:
PHP's convention is currently
responsible for people creating non-standards-compliant documents... And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags is
our business...About which standard are you talking?
Regards,
Oliver
Tijnema ! wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If
ASP runsfirst then there isn't a problem, but if PHP runs first, it would
execute the ASP code.
There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup
outsidetheir own little world...
I've seen such code on the net some time ago...But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.
Best regards,
Marcus
And let me stress that this is something we're forcing people to do
when they're on a short tags enabled server... It's not something
they're allowed to do at free will... PHP's convention is currently
responsible for people creating non-standards-compliant documents...
And
I think we should take that responsibility and clean up the mess we
made... The XML spec is outside our scope... What's inside <?php tags
is
our business...
"PHP's convention is currently responsible for people creating
non-standards-compliant documents..."
What are you smoking? :-)
Having short tags on doesn't force people to create
non-standards-compliant documents.
People not bothering to follow standards aren't suddenly going to
follow them just because short tags is no longer available.
It doesn't even need to look as ugly as posted here if you just use
single quotes.
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
<?='<?xml version="1.0" encoding="UTF_8" ?>', "\n" ?>
[shrug]
Whatever.
I'll miss the <?= personally, as it was quite handy for interspersed
mini-calculations not easily wedged into heredocs without a log of
extra lines of code assigning to one-use variables...
--
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?
Hello Tijnema,
Saturday, April 14, 2007, 11:13:17 AM, you wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
What about the even shorter version:
<?="<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
so ermmm, i must be dreaming:
==================
<?xml version="1.0" encoding="UTF-8"?>
<?php echo "Damn Shit, this even works inside $['random_company']";?>
That's real ugly code...
Tijnema
Guilherme Blanco wrote:
I really can't see a reason to mantain ASP tags.
Ok, short tags is good because of <?=$something?>, but it doesn't
behavior well with XML documents. So, if your intention is to change
short tags to ASP tag in a near future, ok. ASP tags does not mix XML
documents.
Otherwise, ASP tags is the most useless thing I've ever heard in PHP
sphere. I really don't know why wasn't it dropped in PHP5.That's what I think... IMHO.
[]s,
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.There are actually people running both PHP and ASP in series to
generate HTML?If they are, they can turn ASP tags OFF in php.ini
And they certainly aren't going to be distributing that setup outside
their own little world...I've seen such code on the net some time ago...
But should you distribute PHP code with ASP tags? That's not good
either i think. So there's no use of the ASP tags, and they can only
interfere with ASP.Tijnema
--
Best regards,
Marcus
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.
-Stut
If you plan to go far and remove the <? tags, so I suggest to include
a <?php=$something?> into PHP.
Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Carlos - SP/Brazil
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?echo".
best regards
marcus
Saturday, April 14, 2007, 6:01:37 PM, you wrote:
If you plan to go far and remove the <? tags, so I suggest to include
a <?php=$something?> into PHP.
Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
Best regards,
Marcus
This sounds handy.
At least it's possible to use inside XML documents and are easy to use as <?=...
The topic discussion is about ASP tags. IMHO, they are useless and
just contribute to programmers write non-standards code. They should
be dropped.
On the other hand, I usually don't like short tags because of XML
compliant code. I have them disabled in all environments I develop.
But I still believe that a quick way to write content, without messing
XML documents is a great feature. So, if you plan to support something
like this, I think it's a nice addiction to PHP, as long as it do not
stay in the short tags scope.
Personally I use a "e" function to do the task. So... I write this:
<?php e("Something"); ?> that is shorter thans echo. But <?echo is
quickier and simpler than my approach. =)
Best regards,
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?echo".
best regards
marcusSaturday, April 14, 2007, 6:01:37 PM, you wrote:
If you plan to go far and remove the <? tags, so I suggest to include
a <?php=$something?> into PHP.Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
Best regards,
Marcus
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Carlos - SP/Brazil
Hello Guilherme,
if you would read the XML specs more carefulyl you'd find out that they
forbid stuff like <?= or even <?php=. consult the follwing excerpt:
2.6 Processing Instructions
[3] S ::= (#x20 | #x9 | #xD | #xA)+
[4] NameChar ::= Letter | Digit | '.' | '-' | '' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '' | ':') (NameChar)*
[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
[84] Letter ::= BaseChar | Ideographic
[85] BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | .....
[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87] CombiningChar ::= [#x0300-#x0345] | .....
[88] Digit ::= [#x0030-#x0039] | [#x0660-#x0669] | .....
[89] Extender ::= #x00B7 | #x02D0 | .....
"=" == #x003D
Saturday, April 14, 2007, 6:54:13 PM, you wrote:
This sounds handy.
At least it's possible to use inside XML documents and are easy to use as <?=...
The topic discussion is about ASP tags. IMHO, they are useless and
just contribute to programmers write non-standards code. They should
be dropped.
On the other hand, I usually don't like short tags because of XML
compliant code. I have them disabled in all environments I develop.
But I still believe that a quick way to write content, without messing
XML documents is a great feature. So, if you plan to support something
like this, I think it's a nice addiction to PHP, as long as it do not
stay in the short tags scope.
Personally I use a "e" function to do the task. So... I write this:
<?php e("Something"); ?> that is shorter thans echo. But <?echo is
quickier and simpler than my approach. =)
Best regards,
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?echo".
best regards
marcusSaturday, April 14, 2007, 6:01:37 PM, you wrote:
If you plan to go far and remove the <? tags, so I suggest to include
a <?php=$something?> into PHP.Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
Best regards,
Marcus
Best regards,
Marcus
Hello Marcus,
I'm afraid you got it backwards. PHP source does not have to comply
with XML, or for that matter any other spec. The result of the PHP
code execution, should the desired output be XML, would of course
have to be.
So what the XML specification say is irrelevant for this discussion.
The problem that I was referring to was that PHP will not be able to
parse XML if you have short_tags enabled.
Edin
Hello Guilherme,
if you would read the XML specs more carefulyl you'd find out
that they
forbid stuff like <?= or even <?php=. consult the follwing excerpt:2.6 Processing Instructions
[3] S ::= (#x20 | #x9 | #xD | #xA)+
[4] NameChar ::= Letter | Digit | '.' | '-' | '' | ':' |
CombiningChar | Extender
[5] Name ::= (Letter | '' | ':') (NameChar)*[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>'
Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))[84] Letter ::= BaseChar | Ideographic
[85] BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-
#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | .....
[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87] CombiningChar ::= [#x0300-#x0345] | .....
[88] Digit ::= [#x0030-#x0039] | [#x0660-#x0669] | .....
[89] Extender ::= #x00B7 | #x02D0 | ....."=" == #x003D
Saturday, April 14, 2007, 6:54:13 PM, you wrote:
This sounds handy.
At least it's possible to use inside XML documents and are easy to
use as <?=...The topic discussion is about ASP tags. IMHO, they are useless and
just contribute to programmers write non-standards code. They should
be dropped.On the other hand, I usually don't like short tags because of XML
compliant code. I have them disabled in all environments I develop.
But I still believe that a quick way to write content, without
messing
XML documents is a great feature. So, if you plan to support
something
like this, I think it's a nice addiction to PHP, as long as it do not
stay in the short tags scope.Personally I use a "e" function to do the task. So... I write this:
<?php e("Something"); ?> that is shorter thans echo. But <?echo is
quickier and simpler than my approach. =)Best regards,
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?
echo".best regards
marcusSaturday, April 14, 2007, 6:01:37 PM, you wrote:
If you plan to go far and remove the <? tags, so I suggest to
include
a <?php=$something?> into PHP.Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not
standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to
favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to
see short
tags dropped but retain support for <?= as it makes templates a
lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
Best regards,
MarcusBest regards,
Marcus
Hello Marcus,
I'm afraid you got it backwards. PHP source does not have to comply
with XML, or for that matter any other spec. The result of the PHP
code execution, should the desired output be XML, would of course
have to be.So what the XML specification say is irrelevant for this discussion.
The problem that I was referring to was that PHP will not be able to
parse XML if you have short_tags enabled.
Actually it's very relevant depending on your intentions. Advanced
WYSIWYG template engines may wish to treat the raw PHP document as an
XML document to manipulate the nodes as with any XML document. Without
an XML compliant markup then this becomes an issue.
Cheers,
Rob.
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Cummings wrote:
Hello Marcus,
I'm afraid you got it backwards. PHP source does not have to comply
with XML, or for that matter any other spec. The result of the PHP
code execution, should the desired output be XML, would of course
have to be.So what the XML specification say is irrelevant for this discussion.
The problem that I was referring to was that PHP will not be able to
parse XML if you have short_tags enabled.Actually it's very relevant depending on your intentions. Advanced
WYSIWYG template engines may wish to treat the raw PHP document as an
XML document to manipulate the nodes as with any XML document. Without
an XML compliant markup then this becomes an issue.
So you mean that a new XML compatible syntax should be introduced?
<script type="text/php"><![CDATA[ ... ]]></script>and
<php valueof="$var"/> and <?php=$var?>
instead of or slowly replace
<?=$var?> and <%=$var%>
I like <?php= over <?echo because its the same amount of chars and the
first clearly indicates that it's PHP-related.
I think that short_tags should be removed because of XML compatibility
and asp_tags to avoid PHP code to be confused as ASP, by newbies trying
to learn PHP or ASP. What if ASP Classic in Longhorn server will support
<? or <?php as opening tag, would that just be great?
A gentle way to drop support for short_tags and asp_tags, could be to
drop support for them in php.ini, but still allow the few people using
them to enable it in .htaccess or similar, or force people to recompile
PHP to add support for it. Ok, now I am being mean :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGITWhSViWlxucwuoRAgHQAJ92JWOErdi9150j+lRiNLeGNkkjRgCeLbYb
hslgTPXPR7s1c4IizrVxx90=
=NCw+
-----END PGP SIGNATURE
Hello Guilherme,
if you would read the XML specs more carefulyl you'd find out that they
forbid stuff like <?= or even <?php=. consult the follwing excerpt:2.6 Processing Instructions
[3] S ::= (#x20 | #x9 | #xD | #xA)+
[4] NameChar ::= Letter | Digit | '.' | '-' | '' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '' | ':') (NameChar)*[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))[84] Letter ::= BaseChar | Ideographic
[85] BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] |
[#x00D8-#x00F6] | [#x00F8-#x00FF] | .....
[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87] CombiningChar ::= [#x0300-#x0345] | .....
[88] Digit ::= [#x0030-#x0039] | [#x0660-#x0669] | .....
[89] Extender ::= #x00B7 | #x02D0 | ....."=" == #x003D
My bad, sorry. I felt happy with the possibility of <?echo $something
?> that I didn't pay too much attention on what I've written.
I think that short_tags should be removed because of XML compatibility
and asp_tags to avoid PHP code to be confused as ASP, by newbies trying
to learn PHP or ASP. What if ASP Classic in Longhorn server will support
<? or <?php as opening tag, would that just be great?A gentle way to drop support for short_tags and asp_tags, could be to
drop support for them in php.ini, but still allow the few people using
them to enable it in .htaccess or similar, or force people to recompile
PHP to add support for it. Ok, now I am being mean :)
That would be perfect!
But... there will be a lot of people that will start some flaming
emails about the removal of these support. As long it became well
documented, there will be not problem.
I liked the idea of <?echo.
Best regards,
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Carlos - SP/Brazil
Hello Edin,
if I care about generating PHP using XML tools it suddenly matters a lot.
best regards
marcus
Saturday, April 14, 2007, 7:51:43 PM, you wrote:
Hello Marcus,
I'm afraid you got it backwards. PHP source does not have to comply
with XML, or for that matter any other spec. The result of the PHP
code execution, should the desired output be XML, would of course
have to be.
So what the XML specification say is irrelevant for this discussion.
The problem that I was referring to was that PHP will not be able to
parse XML if you have short_tags enabled.
Edin
Hello Guilherme,
if you would read the XML specs more carefulyl you'd find out
that they
forbid stuff like <?= or even <?php=. consult the follwing excerpt:2.6 Processing Instructions
[3] S ::= (#x20 | #x9 | #xD | #xA)+
[4] NameChar ::= Letter | Digit | '.' | '-' | '' | ':' |
CombiningChar | Extender
[5] Name ::= (Letter | '' | ':') (NameChar)*[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>'
Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))[84] Letter ::= BaseChar | Ideographic
[85] BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-
#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | .....
[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
[87] CombiningChar ::= [#x0300-#x0345] | .....
[88] Digit ::= [#x0030-#x0039] | [#x0660-#x0669] | .....
[89] Extender ::= #x00B7 | #x02D0 | ....."=" == #x003D
Saturday, April 14, 2007, 6:54:13 PM, you wrote:
This sounds handy.
At least it's possible to use inside XML documents and are easy to
use as <?=...The topic discussion is about ASP tags. IMHO, they are useless and
just contribute to programmers write non-standards code. They should
be dropped.On the other hand, I usually don't like short tags because of XML
compliant code. I have them disabled in all environments I develop.
But I still believe that a quick way to write content, without
messing
XML documents is a great feature. So, if you plan to support
something
like this, I think it's a nice addiction to PHP, as long as it do not
stay in the short tags scope.Personally I use a "e" function to do the task. So... I write this:
<?php e("Something"); ?> that is shorter thans echo. But <?echo is
quickier and simpler than my approach. =)Best regards,
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?
echo".best regards
marcusSaturday, April 14, 2007, 6:01:37 PM, you wrote:
If you plan to go far and remove the <? tags, so I suggest to
include
a <?php=$something?> into PHP.Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not
standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to
favor dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to
see short
tags dropped but retain support for <?= as it makes templates a
lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
Best regards,
MarcusBest regards,
Marcus--
Best regards,
Marcus
PHP source as an XML document...
[shudder]
--
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?
Hello Guilherme,
"<?=" is also not confirm toxml spec. What we could do is "<?echo".
I just don't understand why you think PHP source should conform to XML
spec...
I might use PHP to produce compliant XML.
But my PHP source code itself is not going to be XML.
--
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?
I use <?=...?>, too, because is much more readable in templates. On the
other hand I would like to disable short-tags without losing this feature!
So my +1 for a change here!
Uwe Schindler
thetaphi@php.net - http://www.php.net
NSAPI SAPI developer
Bremen, Germany
Sent: Saturday, April 14, 2007 6:02 PM
To: Stut
Cc: Bart de Boer; internals@lists.php.net; Tijnema !; ceo@l-i-e.com; Chad
Daelhousen; Ron Korving
Subject: Re: [PHP-DEV] dropping asp_tags in HEADIf you plan to go far and remove the <? tags, so I suggest to include
a <?php=$something?> into PHP.Best regards,
Bart de Boer wrote:
I think ASP tags should go too... Simply because it's not standards
compliant and I think it's good if people are forced to make nice
standards compliant documents... I'd even go so far as to favor
dropping
short tags too...<? echo "<?xml version="1.0" encoding="UTF-8" ?>\n"; ?>
What a mess!...
I agree, but I do like the <?= tag. Personally I would like to see short
tags dropped but retain support for <?= as it makes templates a lot
easier to read, i.e. <?=$var?> against <?php print $var; ?>.-Stut
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Carlos - SP/Brazil
The last time I used ASP tags: Never.
I wish they'd just go forever! People keep trying to use the on my
servers, fail and ask me to turn PHP's asp_tags on, I refuse, because I
run a shared PHP install, and so they move off elsewhere, rather than
change their code.
As it is, PHP is loosing me business!
Just drop ASP tags, Short tags et al (except <?php ... ?>) and let's
live with it.
Chris
Tijnema ! wrote:
I don't see why you are all against dropping the ASP tags. I see
people using ASP & PHP in one script, what would that do? If ASP runs
first then there isn't a problem, but if PHP runs first, it would
execute the ASP code.Tijnema
The last time I used ASP tags: Never.
I wish they'd just go forever! People keep trying to use the on my
servers, fail and ask me to turn PHP's asp_tags on, I refuse, because I
run a shared PHP install, and so they move off elsewhere, rather than
change their code.As it is, PHP is loosing me business!
Only because you're being stubborn here.
Just drop ASP tags, Short tags et al (except <?php ... ?>) and let's
live with it.
Yup, so that we make life harder for people. Definitely the way to go.
regards,
Derick
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
The last time I used ASP tags: Never.
I wish they'd just go forever! People keep trying to use the on my
servers, fail and ask me to turn PHP's asp_tags on, I refuse, because I
run a shared PHP install, and so they move off elsewhere, rather than
change their code.As it is, PHP is loosing me business!
Only because you're being stubborn here.
Just drop ASP tags, Short tags et al (except <?php ... ?>) and let's
live with it.Yup, so that we make life harder for people. Definitely the way to go.
ASP tags make it harder, short tags don't. I'd say remove ASP tags,
keep short tags. I've seen the craziest things around, i've seen
hosting providers that had ASP and PHP both parsing every file, not
only .php or .asp, but also .html etc.
But they also had ASP tags enabled in PHP, and people got trouble
executing their ASP script because PHP ran first, and executed the ASP
code (error, error, error...).
Of course, short tags can break with xml, but the short tags are used
way too much, so removing them will break 1000s of scripts. removing
ASP tags would break 100? I guess no more then that.
Tijnema
I've seen the craziest things around, i've seen
hosting providers that had ASP and PHP both parsing every file, not
only .php or .asp, but also .html etc.
But they also had ASP tags enabled in PHP, and people got trouble
executing their ASP script because PHP ran first, and executed the ASP
code (error, error, error...).
Are we really responsible for bad system administration ?
Of course, short tags can break with xml, but the short tags are used
way too much, so removing them will break 1000s of scripts. removing
ASP tags would break 100? I guess no more then that.
What metric are you using to evaluate that ?
--
Nicolas Bérard-Nault (nicobn@gmail.com)
Étudiant D.E.C. Sciences, Lettres & Arts
Cégep de Sherbrooke
Page personnelle: http://nicobn.googlepages.com
I've seen the craziest things around, i've seen
hosting providers that had ASP and PHP both parsing every file, not
only .php or .asp, but also .html etc.
But they also had ASP tags enabled in PHP, and people got trouble
executing their ASP script because PHP ran first, and executed the ASP
code (error, error, error...).Are we really responsible for bad system administration ?
Not totally, but the ASP tags can only break systems i think. Using
them will get yourself into trouble.
Of course, short tags can break with xml, but the short tags are used
way too much, so removing them will break 1000s of scripts. removing
ASP tags would break 100? I guess no more then that.What metric are you using to evaluate that ?
All values mentioned above are guessed, from all the scripts i browsed
on the internet in the past years.
Tijnema
--
Nicolas Bérard-Nault (nicobn@gmail.com )
Étudiant D.E.C. Sciences, Lettres & Arts
Cégep de SherbrookePage personnelle: http://nicobn.googlepages.com
The last time I used ASP tags: Never.
I wish they'd just go forever! People keep trying to use the on my
servers, fail and ask me to turn PHP's asp_tags on, I refuse, because I
run a shared PHP install, and so they move off elsewhere, rather than
change their code.
asp_tags can be set in php.ini, webserver configuration and .htaccess
files. .htaccess files are not shared between web hosts. webserver
configuration can apply different settings on selected web host.
--
Tomas
Antony Dovgal 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.diffBig 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
IMO there is little to gain by dropping support for <%, it only risks
breaking scripts relying on out.
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--
Ilia Alshanetsky
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.
-----Original Message-----
From: Antony Dovgal [mailto:antony@zend.com]
Sent: Thursday, April 12, 2007 12:32 PM
To: php-dev
Subject: [PHP-DEV] dropping asp_tags in HEADHello 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--
To
unsubscribe, visit: http://www.php.net/unsub.php