1--TEST--
2Test strip_tags() function : usage variations - valid value for 'str' and invalid values for 'allowable_tags'
3--FILE--
4<?php
5/*
6 * testing functionality of strip_tags() by giving valid value for $str and invalid values for $allowable_tags argument
7*/
8
9echo "*** Testing strip_tags() : usage variations ***\n";
10
11$strings = "<html>hello</html> \tworld... <p>strip_tags_test\v\f</p><?php hello\t wo\rrld?>";
12
13$quotes = array (
14  "<nnn>",
15  '<nnn>',
16  "<abc>",
17  '<abc>',
18  "<%?php",
19  '<%?php',
20  "<<html>>",
21  '<<html>>'
22);
23
24//loop through the various elements of strings array to test strip_tags() functionality
25$iterator = 1;
26foreach($quotes as $string_value)
27{
28      echo "-- Iteration $iterator --\n";
29      var_dump( strip_tags($strings, $string_value) );
30      $iterator++;
31}
32
33echo "Done";
34?>
35--EXPECT--
36*** Testing strip_tags() : usage variations ***
37-- Iteration 1 --
38string(33) "hello 	world... strip_tags_test"
39-- Iteration 2 --
40string(33) "hello 	world... strip_tags_test"
41-- Iteration 3 --
42string(33) "hello 	world... strip_tags_test"
43-- Iteration 4 --
44string(33) "hello 	world... strip_tags_test"
45-- Iteration 5 --
46string(33) "hello 	world... strip_tags_test"
47-- Iteration 6 --
48string(33) "hello 	world... strip_tags_test"
49-- Iteration 7 --
50string(46) "<html>hello</html> 	world... strip_tags_test"
51-- Iteration 8 --
52string(46) "<html>hello</html> 	world... strip_tags_test"
53Done
54