Re: Use <?= instead of <%=

From: Date: Sat, 13 Jan 2001 20:19:19 +0000
Subject: Re: Use <?= instead of <%=
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34401@lists.php.net to get a copy of this message
My understanding is : 1. <?= is essentially php4+ specific 2. Will not work if short_tags_open setting is off (in php.ini) because of the fact that <? is a short tag. Regarding its relation to the ASP counterpart, it is not directly related to <%= as that is an ASP tag which refers to the asp_tags setting which if on, <%= will work, if not on, it will not. Information and references to this can be found here : http://www.php.net/manual/language.basic-syntax.php http://www.php.net/manual/en/configuration.php#ini.asp-tags http://www.php.net/manual/en/configuration.php#ini.short-open-tag I've personally never tried asp tags. Earlier within this thread , the following php internals were posted by Jim Winstead : http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.3&r2=1.4 http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.6&r2=1.7 All in all, if others will be playing with your scripts, don't use asp style as usually this is usually turned off. Use of <?= is mildly dangerous (and debated, my view is 'bad') to use given the reasons above. Philip Olson http://www.cornado.com/ On 13 Jan 2001, Arcady Genkin wrote: > I have noticed that <?= works just as well as <%=. Since this is not > in documentation, how safe is it to use it? > > Many thanks, > -- > Arcady Genkin > Don't read everything you believe. > > -- > 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 (#34401) next »