Re: Re: equivalent of asp's <%= strTest %>

From: Date: Sun, 08 Apr 2001 04:30:32 +0000
Subject: Re: Re: equivalent of asp's <%= strTest %>
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-47624@lists.php.net to get a copy of this message
> And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? Because no matter what installation of PHP you have, this works: <?php echo $var; ?> But this: <?=$var?> Or this: <? echo $var; ?> Or this: <% echo $var; %> ...is made invalid if short_tags are disabled (and the last only works with ASP tag support, and I'd say 90% of PHP users don't have it enabled). And if the tags are turned off, guess what happens to all the code between those tags? woops ;) And as mentioned, short_tags must be disabled on .xml pages. Or they at least "should" be. While there are work-arounds, if you didn't use short-tags you wouldn't ever have a problem with any standard unless <?php becomes part of their markup, lol. And if it does, they will have to be "dealt with" :) -- Plutarck Should be working on something... ...but forgot what it was. "Michael Kimsal" <michael@tapinternet.com> wrote in message news:3ACF4794.86A78371@tapinternet.com... > Yes yes I'm a zealot. :) > > If the people defining the PEAR standards really were that interested in > standards, > why include alternate ways of doing something? <?=$blah;?> > And if the 'short tag' method is useful enough for people, why 'exclude' it > from a standard? This notion of 'PEAR standards' does irk me some, because > it's been so long in coming, and people are deferring to it before it's a reality. > > At least, that's the impression that I get. > > > > Philip Olson wrote: > > > > > 1. Is PHP4+ specific > > 2. Won't work if short_open_tag setting is off (in php.ini) > > - One reason to turn this off, to enable XML support > > 3. Doesn't follow up-and-coming PEAR coding standards > > > > And as you've seen, many don't even know what <?= is. You'll find zealots > > on both sides of this use, the choice is yours. ;-) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47624) next »