Skip to content

Commit

Permalink
Remove <% and <script language="php"> tags
Browse files Browse the repository at this point in the history
As per https://wiki.php.net/rfc/remove_alternative_php_tags.

Removes:
 * <% opening tag
 * %> closing tag
 * <%= short opening tag
 * /<script\s+language\s*=\s*(php|"php"|'php')\s*>/i opening tag
 * /</script>/i closing tag
 * asp_tags ini directive
  • Loading branch information
nikic committed Oct 5, 2014
1 parent d58b706 commit e756333
Show file tree
Hide file tree
Showing 12 changed files with 3,345 additions and 3,884 deletions.
6 changes: 1 addition & 5 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,16 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path TSRMLS_
/* }}} */

#ifdef ZTS
static zend_bool asp_tags_default = 0;
static zend_bool short_tags_default = 1;
static zend_bool short_tags_default = 1;
static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT;
#else
# define asp_tags_default 0
# define short_tags_default 1
# define compiler_options_default ZEND_COMPILE_DEFAULT
#endif

static void zend_set_default_compile_time_values(TSRMLS_D) /* {{{ */
{
/* default compile-time values */
CG(asp_tags) = asp_tags_default;
CG(short_tags) = short_tags_default;
CG(compiler_options) = compiler_options_default;
}
Expand Down Expand Up @@ -721,7 +718,6 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
*GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
*GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;

asp_tags_default = CG(asp_tags);
short_tags_default = CG(short_tags);
compiler_options_default = CG(compiler_options);

Expand Down
1 change: 0 additions & 1 deletion Zend/zend_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ struct _zend_compiler_globals {
zend_bool parse_error;
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;

zend_declarables declarables;

Expand Down
Loading

0 comments on commit e756333

Please sign in to comment.