HtMl text',
"I am not a valid html text",
'I am not a valid html text',
"I am a quoted (\") string with special chars like \$,\!,\@,\%,\&",
'I am a quoted (\") string with special chars like \$,\!,\@,\%,\&',
);
//valid html and php tags
$quotes = "";
//loop through the various elements of strings array to test strip_tags() functionality
$iterator = 1;
foreach($strings as $string_value)
{
echo "-- Iteration $iterator --\n";
var_dump( strip_tags($string_value, $quotes) );
$iterator++;
}
echo "Done";
?>
--EXPECTF--
*** Testing strip_tags() : usage variations ***
-- Iteration 1 --
string(32) "hello world... strip_tags_test"
-- Iteration 2 --
string(34) "hello \t\tworld... strip_tags_test"
-- Iteration 3 --
string(0) ""
-- Iteration 4 --
string(0) ""
-- Iteration 5 --
string(18) "hello"
-- Iteration 6 --
string(18) "hello"
-- Iteration 7 --
string(9) "HtMl text"
-- Iteration 8 --
string(9) "HtMl text"
-- Iteration 9 --
string(26) "I am not a valid html text"
-- Iteration 10 --
string(26) "I am not a valid html text"
-- Iteration 11 --
string(62) "I am a quoted (") string with special chars like $,\!,\@,\%,\&"
-- Iteration 12 --
string(64) "I am a quoted (\") string with special chars like \$,\!,\@,\%,\&"
Done