summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/strip_tags_variation11.phpt
blob: 3b47b5c6b14ce5389c1674a93026539bcbd25fe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--TEST--
Test strip_tags() function : obscure values within attributes
--INI--
short_open_tag = on
--FILE--
<?php

echo "*** Testing strip_tags() : obscure functionality ***\n";

// array of arguments 
$string_array = array (
  'hello <img title="<"> world',
  'hello <img title=">"> world',
  'hello <img title=">_<"> world',
  "hello <img title='>_<'> world"
);
  
  		
// Calling strip_tags() with default arguments
// loop through the $string_array to test strip_tags on various inputs
$iteration = 1;
foreach($string_array as $string)
{
  echo "-- Iteration $iteration --\n";
  var_dump( strip_tags($string) );
  $iteration++;
}

echo "Done";
?>
--EXPECTF--
*** Testing strip_tags() : obscure functionality ***
-- Iteration 1 --
string(12) "hello  world"
-- Iteration 2 --
string(12) "hello  world"
-- Iteration 3 --
string(12) "hello  world"
-- Iteration 4 --
string(12) "hello  world"
Done