Lines Matching refs:htmlspecialchars
2 Test htmlspecialchars() function
5 /* Prototype: string htmlspecialchars ( string $string [, int $quote_style [, string $charset]] );
9 /* retrieving htmlspecialchars from the ANSI character table */
10 echo "*** Retrieving htmlspecialchars for 256 characters ***\n";
12 var_dump( bin2hex( htmlspecialchars(b"chr($i)") ) );
15 echo "\n*** Testing htmlspecialchars() with NULL as first, second and third argument ***\n";
16 var_dump( htmlspecialchars("<br>", NULL, 'iso-8859-1') );
17 var_dump( htmlspecialchars("<br>", ENT_NOQUOTES, NULL) );
18 var_dump( htmlspecialchars("<br>", ENT_QUOTES, NULL) );
19 var_dump( htmlspecialchars("<br>", ENT_COMPAT, NULL) );
20 var_dump( htmlspecialchars(NULL, NULL, NULL) );
24 var_dump( htmlspecialchars("<br>Testing<p>New file.</p><p><br>File <b><i><u>WORKS!!!</i></u></b></p…
27 echo "\n*** Testing a normal string with htmlspecialchars() ***\n";
28 var_dump( htmlspecialchars("<br>Testing<p>New file.</p> ", ENT_QUOTES, 'iso-8859-1' ) );
31 echo "\n*** Testing htmlspecialchars() on a quote...\n";
33 var_dump( htmlspecialchars($str) );
34 var_dump( htmlspecialchars($str, ENT_QUOTES) );
35 var_dump( htmlspecialchars($str, ENT_NOQUOTES) );
36 var_dump( htmlspecialchars($str, ENT_COMPAT) );
40 var_dump( htmlspecialchars() );
43 var_dump( htmlspecialchars("<br>",ENT_QUOTES,'iso-8859-1', "test2") );
48 *** Retrieving htmlspecialchars for 256 characters ***
306 *** Testing htmlspecialchars() with NULL as first, second and third argument ***
316 *** Testing a normal string with htmlspecialchars() ***
319 *** Testing htmlspecialchars() on a quote...
327 Warning: htmlspecialchars() expects at least 1 parameter, 0 given in %s on line %d