Skip to content

Commit 2b6cdcf

Browse files
committed
Remove PHP Short Tags.
1 parent 21917d2 commit 2b6cdcf

19 files changed

+1
-107
lines changed

Zend/zend.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,17 +511,14 @@ static FILE *zend_fopen_wrapper(const char *filename, zend_string **opened_path)
511511
/* }}} */
512512

513513
#ifdef ZTS
514-
static zend_bool short_tags_default = 0;
515514
static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT;
516515
#else
517-
# define short_tags_default 0
518516
# define compiler_options_default ZEND_COMPILE_DEFAULT
519517
#endif
520518

521519
static void zend_set_default_compile_time_values(void) /* {{{ */
522520
{
523521
/* default compile-time values */
524-
CG(short_tags) = short_tags_default;
525522
CG(compiler_options) = compiler_options_default;
526523
}
527524
/* }}} */
@@ -1002,7 +999,6 @@ int zend_post_startup(void) /* {{{ */
1002999
*GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;
10031000
global_map_ptr_last = compiler_globals->map_ptr_last;
10041001

1005-
short_tags_default = CG(short_tags);
10061002
compiler_options_default = CG(compiler_options);
10071003

10081004
zend_destroy_rsrc_list(&EG(persistent_list));

ext/standard/tests/strings/strip_tags_basic1.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : basic functionality - with default arguments
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -43,7 +41,6 @@ foreach($string_array as $string)
4341
echo "Done";
4442
?>
4543
--EXPECT--
46-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4744
*** Testing strip_tags() : basic functionality ***
4845
-- Iteration 1 --
4946
string(5) "hello"

ext/standard/tests/strings/strip_tags_basic2.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : basic functionality - with all arguments
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($allowed_tags_array as $tags)
3937
echo "Done";
4038
?>
4139
--EXPECT--
42-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4340
*** Testing strip_tags() : basic functionality ***
4441
-- Iteration 1 --
4542
string(33) "<html>helloworldOther text</html>"

ext/standard/tests/strings/strip_tags_variation10.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - single quoted strings
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($single_quote_string as $string_value)
3937
echo "Done";
4038
?>
4139
--EXPECT--
42-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4340
*** Testing strip_tags() : usage variations ***
4441
-- Iteration 1 --
4542
string(51) "<html> \$ -> This represents the dollar sign</html>"

ext/standard/tests/strings/strip_tags_variation11.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : obscure values within attributes
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75

@@ -29,7 +27,6 @@ foreach($string_array as $string)
2927
echo "Done";
3028
?>
3129
--EXPECT--
32-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
3330
*** Testing strip_tags() : obscure functionality ***
3431
-- Iteration 1 --
3532
string(12) "hello world"

ext/standard/tests/strings/strip_tags_variation2.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - unexpected values for 'allowable_tags'
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -86,7 +84,6 @@ foreach($values as $value) {
8684
echo "Done";
8785
?>
8886
--EXPECT--
89-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
9087
*** Testing strip_tags() : usage variations ***
9188
-- Iteration 1 --
9289
string(10) "helloworld"

ext/standard/tests/strings/strip_tags_variation4.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - invalid values for 'str' and valid 'allowable_tags'
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -46,7 +44,6 @@ foreach($strings as $string_value)
4644
echo "Done";
4745
?>
4846
--EXPECT--
49-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
5047
*** Testing strip_tags() : usage variations ***
5148
-- Iteration 1 --
5249
string(32) "hello world... strip_tags_test"

ext/standard/tests/strings/strip_tags_variation5.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - heredoc strings
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -78,7 +76,6 @@ for($index =0; $index < count($res_heredoc_strings); $index ++) {
7876
echo "Done\n";
7977
?>
8078
--EXPECT--
81-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
8279
*** Testing strip_tags() : usage variations ***
8380
-- Iteration 1 --
8481
string(0) ""

ext/standard/tests/strings/strip_tags_variation6.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - binary safe checking
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -35,7 +33,6 @@ foreach($strings as $value)
3533
echo "Done";
3634
?>
3735
--EXPECT--
38-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
3936
*** Testing strip_tags() : usage variations ***
4037
-- Iteration 1 --
4138
string(18) " I am html string "

ext/standard/tests/strings/strip_tags_variation7.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - invalid values for 'str' and 'allowable_tags'
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -44,7 +42,6 @@ foreach($strings as $string_value)
4442
echo "Done";
4543
?>
4644
--EXPECT--
47-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4845
*** Testing strip_tags() : usage variations ***
4946
-- Iteration 1 --
5047
string(43) "<abc>hello</abc> world... strip_tags_test"

ext/standard/tests/strings/strip_tags_variation8.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - valid value for 'str' and invalid values for 'allowable_tags'
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($quotes as $string_value)
3937

4038
echo "Done";
4139
--EXPECT--
42-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4340
*** Testing strip_tags() : usage variations ***
4441
-- Iteration 1 --
4542
string(33) "hello world... strip_tags_test "

ext/standard/tests/strings/strip_tags_variation9.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test strip_tags() function : usage variations - double quoted strings
3-
--INI--
4-
short_open_tag = on
53
--FILE--
64
<?php
75
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -37,7 +35,6 @@ foreach($double_quote_string as $string_value)
3735

3836
echo "Done";
3937
--EXPECT--
40-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
4138
*** Testing strip_tags() : usage variations ***
4239
-- Iteration 1 --
4340
string(50) "<html> $ -> This represents the dollar sign</html>"

ext/tokenizer/tests/002.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
token_get_all()
33
--SKIPIF--
44
<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
5-
--INI--
6-
short_open_tag=On
75
--FILE--
86
<?php
97

@@ -22,7 +20,6 @@ foreach ($strings as $s) {
2220
echo "Done\n";
2321
?>
2422
--EXPECTF--
25-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
2623
array(49) {
2724
[0]=>
2825
array(3) {

ext/tokenizer/tests/token_get_all_variation15.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Test token_get_all() function : usage variations - heredoc string for 'source'
33
--SKIPIF--
44
<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
5-
--INI--
6-
short_open_tag=On
75
--FILE--
86
<?php
97
/* Prototype : array token_get_all(string $source)
@@ -49,7 +47,6 @@ var_dump( token_get_all($source));
4947
echo "Done"
5048
?>
5149
--EXPECTF--
52-
Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
5350
*** Testing token_get_all() : with heredoc source string ***
5451
array(103) {
5552
[0]=>

main/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,6 @@ PHP_INI_BEGIN()
728728
STD_PHP_INI_ENTRY("output_handler", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateString, output_handler, php_core_globals, core_globals)
729729
STD_PHP_INI_BOOLEAN("register_argc_argv", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, register_argc_argv, php_core_globals, core_globals)
730730
STD_PHP_INI_BOOLEAN("auto_globals_jit", "1", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, auto_globals_jit, php_core_globals, core_globals)
731-
STD_PHP_INI_BOOLEAN("short_open_tag", DEFAULT_SHORT_OPEN_TAG, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, short_tags, zend_compiler_globals, compiler_globals)
732731

733732
STD_PHP_INI_ENTRY("unserialize_callback_func", NULL, PHP_INI_ALL, OnUpdateString, unserialize_callback_func, php_core_globals, core_globals)
734733
STD_PHP_INI_ENTRY("serialize_precision", "-1", PHP_INI_ALL, OnSetSerializePrecision, serialize_precision, php_core_globals, core_globals)
@@ -2344,7 +2343,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
23442343
struct {
23452344
const long error_level;
23462345
const char *phrase;
2347-
const char *directives[18]; /* Remember to change this if the number of directives change */
2346+
const char *directives[17]; /* Remember to change this if the number of directives change */
23482347
} directives[2] = {
23492348
{
23502349
E_DEPRECATED,

tests/lang/short_tags.001.phpt

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/lang/short_tags.002.phpt

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/lang/short_tags.004.phpt

Lines changed: 0 additions & 34 deletions
This file was deleted.

win32/build/config.w32.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
/* PHP Runtime Configuration */
2525
#define PHP_URL_FOPEN 1
2626
#define USE_CONFIG_FILE 1
27-
#define DEFAULT_SHORT_OPEN_TAG "0"
2827

2928
/* Platform-Specific Configuration. Should not be changed. */
3029
#define PHP_SIGCHILD 0

0 commit comments

Comments
 (0)