diff --git a/Zend/tests/bug55445.phpt b/Zend/tests/bug55445.phpt index 2ccba5ff082b8..8ab06860baf9d 100644 --- a/Zend/tests/bug55445.phpt +++ b/Zend/tests/bug55445.phpt @@ -1,7 +1,5 @@ --TEST-- Bug #55445 (Lexer error with short open tags) ---INI-- -short_open_tag=0 --FILE--

Welcome

--EXPECT-- diff --git a/Zend/zend.c b/Zend/zend.c index fceaae62e44f2..54d8f22fdd3a5 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -511,17 +511,14 @@ static FILE *zend_fopen_wrapper(const char *filename, zend_string **opened_path) /* }}} */ #ifdef ZTS -static zend_bool short_tags_default = 1; static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT; #else -# define short_tags_default 1 # define compiler_options_default ZEND_COMPILE_DEFAULT #endif static void zend_set_default_compile_time_values(void) /* {{{ */ { /* default compile-time values */ - CG(short_tags) = short_tags_default; CG(compiler_options) = compiler_options_default; } /* }}} */ @@ -1002,7 +999,6 @@ int zend_post_startup(void) /* {{{ */ *GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants; global_map_ptr_last = compiler_globals->map_ptr_last; - short_tags_default = CG(short_tags); compiler_options_default = CG(compiler_options); zend_destroy_rsrc_list(&EG(persistent_list)); diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 6644e735cae17..b0c2b0b029e5d 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -83,7 +83,6 @@ struct _zend_compiler_globals { zend_bool parse_error; zend_bool in_compilation; - zend_bool short_tags; zend_bool unclean_shutdown; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index b1e25ebae51b3..890342e4babab 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1947,19 +1947,6 @@ string: RETURN_TOKEN(T_OPEN_TAG); } - -"{ANY_CHAR} { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -1977,7 +1964,7 @@ inline_char_handler: } if (*YYCURSOR == '?') { - if (CG(short_tags) || !strncasecmp((char*)YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ + if (!strncasecmp((char*)YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ YYCURSOR--; break; diff --git a/configure.ac b/configure.ac index 00a16cf2bfbe0..d17d9cf737012 100644 --- a/configure.ac +++ b/configure.ac @@ -1000,19 +1000,6 @@ if test "$PHP_LIBGCC" = "yes"; then PHP_ADD_LIBRARY(gcc, yes) fi -PHP_ARG_ENABLE([short-tags], - [whether to enable short tags by default], - [AS_HELP_STRING([--disable-short-tags], - [Disable the short-form 3 && !strncmp(code+i-4, " 3 && !strncmp(code+i-4, " ---INI-- -short_open_tag=1 --FILE-- --EXPECTF-- -array(49) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) " - int(1) - } - [1]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [2]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(4) "echo" - [2]=> - int(1) - } - [3]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [4]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } - [5]=> - string(1) ";" - [6]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [7]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "if" - [2]=> - int(1) - } - [8]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [9]=> - string(1) "(" - [10]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "isset" - [2]=> - int(1) - } - [11]=> - string(1) "(" - [12]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [13]=> - string(1) ")" - [14]=> - string(1) ")" - [15]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [16]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "print" - [2]=> - int(1) - } - [17]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [18]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [19]=> - string(1) "+" - [20]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } - [21]=> - string(1) ";" - [22]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [23]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [24]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "++" - [2]=> - int(1) - } - [25]=> - string(1) ";" - [26]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [27]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [28]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "--" - [2]=> - int(1) - } - [29]=> - string(1) ";" - [30]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [31]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [32]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [33]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "==" - [2]=> - int(1) - } - [34]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [35]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "2" - [2]=> - int(1) - } - [36]=> - string(1) ";" - [37]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [38]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [39]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [40]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(3) "===" - [2]=> - int(1) - } - [41]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [42]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "2" - [2]=> - int(1) - } - [43]=> - string(1) ";" - [44]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [45]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "endif" - [2]=> - int(1) - } - [46]=> - string(1) ";" - [47]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [48]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "?>" - [2]=> - int(1) - } -} -array(37) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(6) " - int(1) - } - [1]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(6) "switch" - [2]=> - int(1) - } - [2]=> - string(1) "(" - [3]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [4]=> - string(1) ")" - [5]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [6]=> - string(1) "{" - [7]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [8]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(4) "case" - [2]=> - int(1) - } - [9]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [10]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } - [11]=> - string(1) ":" - [12]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [13]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "break" - [2]=> - int(1) - } - [14]=> - string(1) ";" - [15]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [16]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(7) "default" - [2]=> - int(1) - } - [17]=> - string(1) ":" - [18]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [19]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "break" - [2]=> - int(1) - } - [20]=> - string(1) ";" - [21]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [22]=> - string(1) "}" - [23]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [24]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "while" - [2]=> - int(1) - } - [25]=> - string(1) "(" - [26]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$a" - [2]=> - int(1) - } - [27]=> - string(1) ")" - [28]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [29]=> - string(1) "{" - [30]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [31]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(4) "exit" - [2]=> - int(1) - } - [32]=> - string(1) ";" - [33]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [34]=> - string(1) "}" - [35]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [36]=> +array(1) { + [0]=> array(3) { [0]=> - int(%d) + int(314) [1]=> - string(2) "?>" + string(78) "" [2]=> int(1) } } -array(48) { +array(37) { [0]=> array(3) { [0]=> - int(%d) + int(380) [1]=> - string(2) " int(1) } [1]=> array(3) { [0]=> - int(%d) + int(334) [1]=> - string(1) " " + string(6) "switch" [2]=> int(1) } [2]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(13) "/* comment */" - [2]=> - int(1) - } + string(1) "(" [3]=> array(3) { [0]=> - int(%d) + int(313) [1]=> - string(1) " " + string(2) "$a" [2]=> int(1) } [4]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "if" - [2]=> - int(1) - } + string(1) ")" [5]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [6]=> - string(1) "(" + string(1) "{" [7]=> array(3) { [0]=> - int(%d) + int(383) [1]=> - string(1) "1" + string(1) " " [2]=> int(1) } [8]=> array(3) { [0]=> - int(%d) + int(336) [1]=> - string(1) " " + string(4) "case" [2]=> int(1) } [9]=> array(3) { [0]=> - int(%d) + int(383) [1]=> - string(2) "||" + string(1) " " [2]=> int(1) } [10]=> array(3) { [0]=> - int(%d) + int(310) [1]=> - string(1) " " + string(1) "1" [2]=> int(1) } [11]=> + string(1) ":" + [12]=> array(3) { [0]=> - int(%d) + int(383) [1]=> - string(1) "2" + string(1) " " [2]=> int(1) } - [12]=> - string(1) ")" [13]=> array(3) { [0]=> - int(%d) + int(338) [1]=> - string(1) " " + string(5) "break" [2]=> int(1) } [14]=> - string(1) "{" + string(1) ";" [15]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [16]=> - string(1) "}" - [17]=> array(3) { [0]=> - int(%d) + int(337) [1]=> - string(1) " " + string(7) "default" [2]=> int(1) } + [17]=> + string(1) ":" [18]=> array(3) { [0]=> - int(%d) + int(383) [1]=> - string(2) "$a" + string(1) " " [2]=> int(1) } [19]=> array(3) { [0]=> - int(%d) + int(338) [1]=> - string(1) " " + string(5) "break" [2]=> int(1) } [20]=> - string(1) "=" + string(1) ";" [21]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [22]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "2" - [2]=> - int(1) - } + string(1) "}" [23]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [24]=> - string(1) "|" - [25]=> array(3) { [0]=> - int(%d) + int(325) [1]=> - string(1) " " + string(5) "while" [2]=> int(1) } + [25]=> + string(1) "(" [26]=> array(3) { [0]=> - int(%d) + int(313) [1]=> - string(1) "1" + string(2) "$a" [2]=> int(1) } [27]=> - string(1) ";" + string(1) ")" [28]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [29]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$b" - [2]=> - int(1) - } + string(1) "{" [30]=> array(3) { [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } [31]=> - string(1) "=" - [32]=> array(3) { [0]=> - int(%d) + int(320) [1]=> - string(1) " " + string(4) "exit" [2]=> int(1) } + [32]=> + string(1) ";" [33]=> array(3) { [0]=> - int(%d) + int(383) [1]=> - string(1) "3" + string(1) " " [2]=> int(1) } [34]=> - string(1) "^" + string(1) "}" [35]=> array(3) { [0]=> - int(%d) - [1]=> - string(1) "2" - [2]=> - int(1) - } - [36]=> - string(1) ";" - [37]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [38]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(2) "$c" - [2]=> - int(1) - } - [39]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) " " - [2]=> - int(1) - } - [40]=> - string(1) "=" - [41]=> - array(3) { - [0]=> - int(%d) + int(383) [1]=> string(1) " " [2]=> int(1) } - [42]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "4" - [2]=> - int(1) - } - [43]=> - string(1) "&" - [44]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "2" - [2]=> - int(1) - } - [45]=> - string(1) ";" - [46]=> + [36]=> array(3) { [0]=> - int(%d) + int(382) [1]=> - string(1) " " + string(2) "?>" [2]=> int(1) } - [47]=> +} +array(1) { + [0]=> array(3) { [0]=> - int(%d) + int(314) [1]=> - string(2) "?>" + string(67) "" [2]=> int(1) } @@ -972,7 +290,7 @@ array(1) { [0]=> array(3) { [0]=> - int(%d) + int(314) [1]=> string(17) "wrong syntax here" [2]=> diff --git a/ext/tokenizer/tests/token_get_all_variation15.phpt b/ext/tokenizer/tests/token_get_all_variation15.phpt index 56269f5d01463..b9e6c1fd9f00c 100644 --- a/ext/tokenizer/tests/token_get_all_variation15.phpt +++ b/ext/tokenizer/tests/token_get_all_variation15.phpt @@ -2,8 +2,6 @@ Test token_get_all() function : usage variations - heredoc string for 'source' --SKIPIF-- ---INI-- -short_open_tag=On --FILE-- tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the tags as PHP source which should be processed as such. It is -; generally recommended that should be used and that this feature -; should be disabled, as enabling it may result in issues when generating XML -; documents, however this remains supported for backward compatibility reasons. -; Note that this directive does not control the -Finished ---EXPECT-- -Used a short tag -Finished diff --git a/tests/lang/short_tags.002.phpt b/tests/lang/short_tags.002.phpt deleted file mode 100644 index 6a3d5e09968f2..0000000000000 --- a/tests/lang/short_tags.002.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -short_open_tag: Off ---INI-- -short_open_tag=off ---FILE-- - -Finished ---EXPECT-- - -Finished diff --git a/tests/lang/short_tags.004.phpt b/tests/lang/short_tags.004.phpt deleted file mode 100644 index 6df8af1c2a698..0000000000000 --- a/tests/lang/short_tags.004.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -short_open_tag: Off ---INI-- -short_open_tag=off ---FILE-- -<%= 'so should this' %> - - - - - -<%= $a%> - - - - - ---EXPECTF-- -<%= 'so should this' %> - - -This gets echoed twice -<%= $a%> - - - - -Notice: Undefined variable: b in %s on line %d - -Notice: Undefined variable: b in %s on line %d diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 06632b0e20d61..4d70fd91506cc 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -24,7 +24,6 @@ /* PHP Runtime Configuration */ #define PHP_URL_FOPEN 1 #define USE_CONFIG_FILE 1 -#define DEFAULT_SHORT_OPEN_TAG "1" /* Platform-Specific Configuration. Should not be changed. */ #define PHP_SIGCHILD 0