Guys, this argument has been killed many times. Please stop. The reasons it won't change:
1. <?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. <?php= would completely break that as the SGML spec (and the XML spec) says to use <?php<whitespace> so it would have to be <?php =$foo?> which is even uglier and would cause a bit of trouble at the parser level. 2. The only reason for using <?php =$foo?> is to save a few keystrokes. We have short_tags and asp_tags for example that reason. These are the non-compliant tag style that people have been taught are ok for local code, but shouldn't be used for distributed code. Therefore if you really do want to save keystrokes, which I am all for, use <?=$foo?> or <%=$foo%> and you are happy. If you ever need to distribute your code, write a 30-second sed script that changes these to <?php echo $foo?> for you. That way local hacks/shortcuts stay local, but the distributed code is proper and readable and people won't be wondering what the heck this = thing is. 3. The whole concept of =$var sucks. Magic tokens with no visible meaning is against the spirit of PHP. Yes, it has snuck in due to popular demand, but I see no reason to help the disease spread any further and give people precedence for then wanting stuff like ~$foo:$bar which might echo $foo if it is non-empty, $bar otherwise. A useful operation to be sure, but we don't want a language that looks like <?php~SID:"new user"?> blah blah <?php=$user_name?> It goes back to the old concept of keeping things readable. Figuring out what = and ~ do in this particular context is difficult. You can't just look them up in the index of a PHP book because first of all they are single-character common tokens, but worse, they are modal tokens. -Rasmus On Fri, 26 Apr 2002, Sam Liddicott wrote: > > > > -----Original Message----- > > From: Brinkman, Theodore > > [mailto:[EMAIL PROTECTED]] > > Sent: 26 April 2002 14:55 > > To: 'PHP Developers Mailing List' > > Subject: RE: [PHP-DEV] <?= and <%= both work, why not <?php= > > > > > > Sure, and its only an extra 4 character, really. But that's > > not the issue > > at hand. The issue at hand is that the inconsistency of > > supporting <?= and > > <%= but not <?php= encourages quite a few people to use the > > 'optional' short > > form tags, meaning that their code isn't portable. > > I guy here who till recently poo-poo'd asp tags is now using them because > <%=$VAR;%> is emminently more readable than the alternative. > > > For each person who says <?php= $variable ?> is hard to read > > at least one > > other person says they find <?php echo $variable ?> harder to read. I > > personally find the first easier to read when it is embedded > > in the middle > > of a long line of HTML (like an input tag for example). > > Yep. > > > What possible harm comes from improving the internal > > consistency of the > > language? Why is a two-line patch that would completely remove an > > inconsistency so bitterly fought against? > > To emphasise; people here are adopting bad-old short tags in order to keep > readability of code. It makes it easy to see the code is passive, echoing > only. > > Sam > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php