Re: short_open_tag
| From: | Terence Kearns | Date: | Tue, 22 Oct 2002 05:50:02 +0000 |
| Subject: | Re: short_open_tag | ||
| References: | 1 2 3 4 5 6 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89875@lists.php.net to get a copy of this message | ||
Dan Hardiker wrote:
spoken like a person who has actually done some work with XML using PHP. Terence.Your missing the point of my suggestion. Im not suggesting we switch it off by default, Im suggesting we *remove* the feature. As the XML community expands and more and more scripting languages (server and client side) are being designed to interoperate, cross-language compatability (or at least handling) is required. The short tag <? is bad form, and shows lazyness. <?php fits the standard, and its my recommendation that (in version 5 of the product) the sort tag option is removed. Yes - this will break *alot* of sloppy scripts (including scripts taking the short cut <?= instead of <?php echo). However, a very simple sh/sed/awk script could be written that scans a directory tree and converts all .php files to .php5 files. Note: this script could also check for other cross version problems that may arrise. My *key* point is that come the upgrade jump from v4 to v5 people will *expect* major differences - otherwise it would just be another step in the v4 tree. Major upgrades are one of the few times you can make major modifications to the structure of a system without users whinging. I am still -1 on anything being changed for v4 in respect to short tags, but +1 on as much as possible being done in v5 to eradicate short tags. <LOUD CHEER!!!>M> Wrong... Many webhosting companies won't allow customers to change M> php.ini, and my experiences with php_set_ini() aren't too good. yep, many of hostings don't allow this. but in 99% XML on such hostings is not allowed too. I think you shouldn't do the wrong thing if someone does...Thousands of programmers use short tags in their scripts, but only hundreds can't change this setting in php.ini manually.