File tree Expand file tree Collapse file tree 11 files changed +6
-36
lines changed
ext/standard/tests/strings Expand file tree Collapse file tree 11 files changed +6
-36
lines changed Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : basic functionality - with default arguments
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -43,7 +41,6 @@ foreach($string_array as $string)
43
41
echo "Done " ;
44
42
?>
45
43
--EXPECT--
46
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
47
44
*** Testing strip_tags() : basic functionality ***
48
45
-- Iteration 1 --
49
46
string(5) "hello"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : basic functionality - with all arguments
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($allowed_tags_array as $tags)
39
37
echo "Done " ;
40
38
?>
41
39
--EXPECT--
42
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
43
40
*** Testing strip_tags() : basic functionality ***
44
41
-- Iteration 1 --
45
42
string(33) "<html>helloworldOther text</html>"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - single quoted strings
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($single_quote_string as $string_value)
39
37
echo "Done " ;
40
38
?>
41
39
--EXPECT--
42
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
43
40
*** Testing strip_tags() : usage variations ***
44
41
-- Iteration 1 --
45
42
string(51) "<html> \$ -> This represents the dollar sign</html>"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : obscure values within attributes
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
@@ -29,7 +27,6 @@ foreach($string_array as $string)
29
27
echo "Done " ;
30
28
?>
31
29
--EXPECT--
32
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
33
30
*** Testing strip_tags() : obscure functionality ***
34
31
-- Iteration 1 --
35
32
string(12) "hello world"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - unexpected values for 'allowable_tags'
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -86,7 +84,6 @@ foreach($values as $value) {
86
84
echo "Done " ;
87
85
?>
88
86
--EXPECT--
89
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
90
87
*** Testing strip_tags() : usage variations ***
91
88
-- Iteration 1 --
92
89
string(10) "helloworld"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - invalid values for 'str' and valid 'allowable_tags'
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -46,7 +44,6 @@ foreach($strings as $string_value)
46
44
echo "Done " ;
47
45
?>
48
46
--EXPECT--
49
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
50
47
*** Testing strip_tags() : usage variations ***
51
48
-- Iteration 1 --
52
49
string(32) "hello world... strip_tags_test"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - heredoc strings
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -78,7 +76,6 @@ for($index =0; $index < count($res_heredoc_strings); $index ++) {
78
76
echo "Done \n" ;
79
77
?>
80
78
--EXPECT--
81
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
82
79
*** Testing strip_tags() : usage variations ***
83
80
-- Iteration 1 --
84
81
string(0) ""
@@ -90,7 +87,8 @@ string(67) "<html>hello world</html>
90
87
91
88
This is a double quoted string"
92
89
-- Iteration 4 --
93
- string(44) "<html>hello world
90
+ string(44) "<html>hello
91
+ world
94
92
1111 != 2222</html>
95
93
"
96
94
-- Iteration 5 --
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - binary safe checking
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -35,7 +33,6 @@ foreach($strings as $value)
35
33
echo "Done " ;
36
34
?>
37
35
--EXPECT--
38
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
39
36
*** Testing strip_tags() : usage variations ***
40
37
-- Iteration 1 --
41
38
string(18) " I am html string "
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - invalid values for 'str' and 'allowable_tags'
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -44,7 +42,6 @@ foreach($strings as $string_value)
44
42
echo "Done " ;
45
43
?>
46
44
--EXPECT--
47
- Deprecated: Directive 'short_open_tag' is deprecated in Unknown on line 0
48
45
*** Testing strip_tags() : usage variations ***
49
46
-- Iteration 1 --
50
47
string(43) "<abc>hello</abc> world... strip_tags_test"
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - valid value for 'str' and invalid values for 'allowable_tags'
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -39,7 +37,6 @@ foreach($quotes as $string_value)
39
37
40
38
echo "Done " ;
41
39
--EXPECT --
42
- Deprecated: Directive 'short_open_tag ' is deprecated in Unknown on line 0
43
40
*** Testing strip_tags() : usage variations ***
44
41
-- Iteration 1 --
45
42
string (33 ) "hello world... strip_tags_test "
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test strip_tags() function : usage variations - double quoted strings
3
- --INI--
4
- short_open_tag = on
5
3
--FILE--
6
4
<?php
7
5
/* Prototype : string strip_tags(string $str [, string $allowable_tags])
@@ -37,19 +35,20 @@ foreach($double_quote_string as $string_value)
37
35
38
36
echo "Done " ;
39
37
--EXPECT --
40
- Deprecated: Directive 'short_open_tag ' is deprecated in Unknown on line 0
41
38
*** Testing strip_tags() : usage variations ***
42
39
-- Iteration 1 --
43
40
string (50 ) "<html> $ -> This represents the dollar sign</html> "
44
41
-- Iteration 2 --
45
- string (59 ) "<html> The quick brown fox jumped over the lazy dog</p> "
42
+ string (59 ) "<html>
43
+ The quick brown fox jumped over the lazy dog</p> "
46
44
-- Iteration 3 --
47
45
string (31 ) "<a>This is a hyper text tag</a> "
48
46
-- Iteration 4 --
49
47
string (0 ) ""
50
48
-- Iteration 5 --
51
49
string (26 ) "<p>This is a paragraph</p> "
52
50
-- Iteration 6 --
53
- string (62 ) "<b>This is a text in bold letters \s\malong with slashes
51
+ string (62 ) "<b>This is a text in bold letters
52
+ \s\malong with slashes
54
53
</b> "
55
54
Done
You can’t perform that action at this time.
0 commit comments