Annotation of embedaddon/php/ext/standard/tests/strings/strip_tags_variation11.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strip_tags() function : obscure values within attributes
                      3: --INI--
                      4: short_open_tag = on
                      5: --FILE--
                      6: <?php
                      7: 
                      8: echo "*** Testing strip_tags() : obscure functionality ***\n";
                      9: 
                     10: // array of arguments 
                     11: $string_array = array (
                     12:   'hello <img title="<"> world',
                     13:   'hello <img title=">"> world',
                     14:   'hello <img title=">_<"> world',
                     15:   "hello <img title='>_<'> world"
                     16: );
                     17:   
                     18:                
                     19: // Calling strip_tags() with default arguments
                     20: // loop through the $string_array to test strip_tags on various inputs
                     21: $iteration = 1;
                     22: foreach($string_array as $string)
                     23: {
                     24:   echo "-- Iteration $iteration --\n";
                     25:   var_dump( strip_tags($string) );
                     26:   $iteration++;
                     27: }
                     28: 
                     29: echo "Done";
                     30: ?>
                     31: --EXPECTF--
                     32: *** Testing strip_tags() : obscure functionality ***
                     33: -- Iteration 1 --
                     34: string(12) "hello  world"
                     35: -- Iteration 2 --
                     36: string(12) "hello  world"
                     37: -- Iteration 3 --
                     38: string(12) "hello  world"
                     39: -- Iteration 4 --
                     40: string(12) "hello  world"
                     41: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>