Lines Matching refs:htmlentities

2 Test htmlentities() function
5 /* Prototype: string htmlentities ( string $string [, int $quote_style [, string $charset]] );
9 /* retrieving htmlentities from the ANSI character table */
10 echo "*** Retrieving htmlentities for 256 characters ***\n";
12 var_dump( bin2hex( htmlentities(b"chr($i)")) );
15 echo "\n*** Testing htmlentities() with NULL as first,second and third argument ***\n";
16 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", NULL, 'cp1252') );
17 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_QUOTES, NULL) ); /* UTF-8 assumed */
18 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_NOQUOTES, NULL) ); /* UTF-8 assumed */
19 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_COMPAT, NULL) ); /* UTF-8 assumed */
20 var_dump( htmlentities(NULL, NULL, NULL) );
24 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x86\x84\x80\x89\x85\x83\x86\x84\x80\x91\x83\x91\x8…
27 echo "\n*** Testing a normal string with htmlentities() ***\n";
28 var_dump( htmlentities("<html> This is a test! </html>") );
33 var_dump( htmlentities($str) );
34 var_dump( htmlentities($str, ENT_QUOTES) );
35 var_dump( htmlentities($str, ENT_NOQUOTES) );
36 var_dump( htmlentities($str, ENT_COMPAT) );
40 var_dump( htmlentities() );
42 var_dump( htmlentities("\x84\x91",ENT_QUOTES, 'cp1252', "test1") );
48 *** Retrieving htmlentities for 256 characters ***
306 *** Testing htmlentities() with NULL as first,second and third argument ***
316 *** Testing a normal string with htmlentities() ***
327 Warning: htmlentities() expects at least 1 parameter, 0 given in %s on line %d