Re: Any reason there is no <?php= ?> syntax?
| From: | Yasuo Ohgaki | Date: | Thu, 18 Oct 2001 09:53:54 +0000 |
| Subject: | Re: Any reason there is no <?php= ?> syntax? | ||
| References: | 1 2 | Groups: | php.lang |
| Request: | Send a blank email to php-lang+get-224@lists.php.net to get a copy of this message | ||
Bb wrote:
> <?=$var ?> i thought
>
> "Yasuo Ohgaki" <yasuo_ohgaki@yahoo.com> wrote in message
> news:3BC598DF.6030502@yahoo.com...
>
>>Is there any reason there is no <?php= ?> syntax?
>>
>>It seems it's just a matter of adding "<?php=" to T_OPEN_TAG_WITH_ECHO
>>in zend_language_scanner.l
>>
>>Is there known side effect for adding <?php= ?> syntax?
I know <?= and <%= syntax. I'm taking about the reason why Zend Engine
does not have "<?php= ?>" syntax. It's only 2 lines of change.
RCS file: /repository/Zend/zend_language_scanner.l,v
retrieving revision 1.40
diff -u -r1.40 zend_language_scanner.l
--- zend_language_scanner.l 2001/09/22 00:06:27 1.40
+++ zend_language_scanner.l 2001/10/18 09:49:39
@@ -938,8 +938,8 @@
}
-<INITIAL>"<%="|"<?=" {
- if ((yytext[1]=='%' && CG(asp_tags)) || (yytext[1]=='?'
&&
CG(short_tags))) {
+<INITIAL>"<%="|"<?="|"<?php=" {
+ if ((yytext[1]=='%' && CG(asp_tags)) || (yytext[1]=='?'
&&
CG(short_tags)) || yytext[2] == 'p') {
zendlval->value.str.val = yytext; /* no copying -
intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;