colder Wed, 17 Aug 2011 23:50:04 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315119
Log: Fix bug #55445 (Incomplete implementation of <?= being independant of short_open_tag) Bug: https://bugs.php.net/55445 (Assigned) Short echo tag still depends on short_open_tag setting Changed paths: A php/php-src/branches/PHP_5_4/Zend/tests/bug55445.phpt U php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.c U php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.l U php/php-src/branches/PHP_5_4/Zend/zend_language_scanner_defs.h A php/php-src/trunk/Zend/tests/bug55445.phpt U php/php-src/trunk/Zend/zend_language_scanner.c U php/php-src/trunk/Zend/zend_language_scanner.l U php/php-src/trunk/Zend/zend_language_scanner_defs.h Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55445.phpt =================================================================== --- php/php-src/branches/PHP_5_4/Zend/tests/bug55445.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55445.phpt 2011-08-17 23:50:04 UTC (rev 315119) @@ -0,0 +1,8 @@ +--TEST-- +Bug #55445 (Lexer error with short open tags) +--INI-- +short_open_tag=0 +--FILE-- +<?php $u = "chris"; ?><p>Welcome <?= $u ?></p> +--EXPECTF-- +<p>Welcome chris</p> Modified: php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.c =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.c 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.c 2011-08-17 23:50:04 UTC (rev 315119) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Tue Aug 16 10:45:19 2011 */ +/* Generated by re2c 0.13.5 on Thu Aug 18 01:36:01 2011 */ #line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ @@ -1099,7 +1099,7 @@ if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ break; } continue; Modified: php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.l =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.l 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/branches/PHP_5_4/Zend/zend_language_scanner.l 2011-08-17 23:50:04 UTC (rev 315119) @@ -1780,7 +1780,7 @@ if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ break; } continue; Modified: php/php-src/branches/PHP_5_4/Zend/zend_language_scanner_defs.h =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_language_scanner_defs.h 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/branches/PHP_5_4/Zend/zend_language_scanner_defs.h 2011-08-17 23:50:04 UTC (rev 315119) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sun Jul 31 20:09:48 2011 */ +/* Generated by re2c 0.13.5 on Thu Aug 18 01:36:01 2011 */ #line 3 "Zend/zend_language_scanner_defs.h" enum YYCONDTYPE { Added: php/php-src/trunk/Zend/tests/bug55445.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug55445.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug55445.phpt 2011-08-17 23:50:04 UTC (rev 315119) @@ -0,0 +1,8 @@ +--TEST-- +Bug #55445 (Lexer error with short open tags) +--INI-- +short_open_tag=0 +--FILE-- +<?php $u = "chris"; ?><p>Welcome <?= $u ?></p> +--EXPECTF-- +<p>Welcome chris</p> Modified: php/php-src/trunk/Zend/zend_language_scanner.c =================================================================== --- php/php-src/trunk/Zend/zend_language_scanner.c 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/trunk/Zend/zend_language_scanner.c 2011-08-17 23:50:04 UTC (rev 315119) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Tue Aug 16 12:22:59 2011 */ +/* Generated by re2c 0.13.5 on Thu Aug 18 01:37:48 2011 */ #line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ @@ -1099,7 +1099,7 @@ if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ break; } continue; Modified: php/php-src/trunk/Zend/zend_language_scanner.l =================================================================== --- php/php-src/trunk/Zend/zend_language_scanner.l 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/trunk/Zend/zend_language_scanner.l 2011-08-17 23:50:04 UTC (rev 315119) @@ -1780,7 +1780,7 @@ if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ break; } continue; Modified: php/php-src/trunk/Zend/zend_language_scanner_defs.h =================================================================== --- php/php-src/trunk/Zend/zend_language_scanner_defs.h 2011-08-17 23:15:20 UTC (rev 315118) +++ php/php-src/trunk/Zend/zend_language_scanner_defs.h 2011-08-17 23:50:04 UTC (rev 315119) @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sun Jul 31 20:09:38 2011 */ +/* Generated by re2c 0.13.5 on Thu Aug 18 01:37:48 2011 */ #line 3 "Zend/zend_language_scanner_defs.h" enum YYCONDTYPE {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php