1--TEST-- 2Test strip_tags() function : usage variations - double quoted strings 3--FILE-- 4<?php 5/* 6 * testing functionality of strip_tags() by giving double quoted strings as values for $str argument 7*/ 8 9echo "*** Testing strip_tags() : usage variations ***\n"; 10 11$double_quote_string = array ( 12 "<html> \$ -> This represents the dollar sign</html><?php echo hello ?>", 13 "<html>\t\r\v The quick brown fo\fx jumped over the lazy dog</p>", 14 "<a>This is a hyper text tag</a>", 15 "<? <html>hello world\\t</html>?>", 16 "<p>This is a paragraph</p>", 17 "<b>This is \ta text in bold letters\r\s\malong with slashes\n</b>" 18); 19 20$quotes = "<html><a><p><b><?php"; 21 22//loop through the various elements of strings array to test strip_tags() functionality 23$iterator = 1; 24foreach($double_quote_string as $string_value) 25{ 26 echo "-- Iteration $iterator --\n"; 27 var_dump( strip_tags($string_value, $quotes) ); 28 $iterator++; 29} 30 31echo "Done"; 32?> 33--EXPECT-- 34*** Testing strip_tags() : usage variations *** 35-- Iteration 1 -- 36string(50) "<html> $ -> This represents the dollar sign</html>" 37-- Iteration 2 -- 38string(59) "<html> 38 The quick brown fox jumped over the lazy dog</p>" 39-- Iteration 3 -- 40string(31) "<a>This is a hyper text tag</a>" 41-- Iteration 4 -- 42string(0) "" 43-- Iteration 5 -- 44string(26) "<p>This is a paragraph</p>" 45-- Iteration 6 -- 46string(62) "<b>This is a text in bold letters 46\s\malong with slashes 47</b>" 48Done 49