OK, after having read the threads, I know I'm gonna get blasted/flamed, but I have to say this cos I've spent a lot of time trying to develop "elegent" XML based solutions in PHP and this issue kills it for me every time. So let me appologise in advance, BUT...

Speaking on v5, not only should support short tags be off by default, it should be completely abandoned

We can't make up for the past in this version because it will break a lot of exisitng PHP scripts, but with version 5, ***most scripts will have to be ported or patched anyway*** to run on v5. This being the case, it won't be difficult for the developers to replace /<\? */ with "<?php "

I can fully understand all the issues to do with the current v4 and prior - particularly ISP issues - but since v5 is a whole new kettle of fish, then there is no excuse - particularly since badly written (short tag) scripts can be *easily* fixed with a recursive search/replace operation.

v5 should be looking after future trends - this means full XML support!
v5 should not be backwards looking!

having to do things like
<?php
my_custom_insert_XMLdeclaration(); // *+ see fottnote
my_custom_insert_XML_PI($name,$content);
?>
is bullshit!!!

Notice that I also have to make sure that there is no whitespace between the beginning of the file and this opening PHP block because the XML spec requires the declaration to be on the first line with no preceeding space!!!!!!!

My point is, that this is not about "convenience" for XML developers, ***it's about supporting standards*** - in this case XML - since that's where the future is.

come on, lets move with the times here.

I mean no disrespect to anyone (especially Andi and Zeev who seem to disagree), but this is my feeling on the matter and I feel strongly compelled to express it.

kind regards,
Terence.


*+ and then inside these fuinctions you have to make sure that you use single quotes to output the string <? so that the parser will skip it. Even though it works, it still seems inelegent to say the least.




PS. just another example (although not the main issue).
you can do nice things like
<?xml version="1.0" encoding="UTF-8"?>
<!-- look at my nice standards compliant processing instuctions :) -->
<?php die("access denied"); // security ?>
<?xml-stylesheet type = "text/xsl" href="foo.xsl"?>
<xmlroot>
...
</xmlroot>

Now this file can be processed as a normal file but anyone trying to pull it directly through the URL will get access denied (or some other custom response). This is a good example of how beautiful and elegent things *could* be - since PHP is a processor and it makes sense that <?php is a processing instruction - just like the standard says!


PSS. The reason this keeps coming up again and again and again is because it has not been resolved.
V5 is a chance to resolve it. Otherwise, we can all look forward to it raising it's ugly head again.
.... and again, and again, and again .....



Evan Nemerson wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just a thought, but I think short_open_tag should be Off by default in php.ini-dist, to prevent PHP from being confused with XML declarations. I know XML declarations aren't required (yet) by w3c, but "XHTML document authors are strongly encouraged to use XML declarations in all their documents." [http://www.w3.org/TR/xhtml11/conformance.html#s_conform]

I rarely see them in the wild, so I don't think there would be _too_ much of a problem with backwards-compatibility... certianly no worse than the register_globals fiasco (although it was the right decision).

I'll try to follow this in the archive, but I don't subscribe to this list, so if you could CC replies, I'd be grateful.

- -Evan Nemerson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9qn9W/rncFku1MdIRAhmfAJ9cnzvZk2MIinNXC6z1sNNa3hIo6gCfRilp
QQ2/fCIQ3cW6RY/ZiVeC4o8=
=x9Ig
-----END PGP SIGNATURE-----




--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to