2
Test get_html_translation_table() function : basic functionality - table as HTML_ENTITIES & diff quote_style
5
if( substr(PHP_OS, 0, 3) != "WIN"){
6
die('skip only for Windows');
9
if( !setlocale(LC_ALL, "English_United States.1252") ) {
10
die('skip failed to set locale settings to "English_United States.1252"');
16
/* Prototype : array get_html_translation_table ( [int $table [, int $quote_style]] )
17
* Description: Returns the internal translation table used by htmlspecialchars and htmlentities
18
* Source code: ext/standard/html.c
21
/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */
24
setlocale(LC_ALL, "English_United States.1252");
27
echo "*** Testing get_html_translation_table() : basic functionality ***\n";
29
// Calling get_html_translation_table() with default arguments
30
echo "-- with default arguments --\n";
31
var_dump( get_html_translation_table() );
33
// Calling get_html_translation_table() with all arguments
34
// $table as HTML_ENTITIES and different quote style
35
echo "-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT --\n";
36
$table = HTML_ENTITIES;
37
$quote_style = ENT_COMPAT;
38
var_dump( get_html_translation_table($table, $quote_style) );
40
echo "-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES --\n";
41
$quote_style = ENT_QUOTES;
42
var_dump( get_html_translation_table($table, $quote_style) );
44
echo "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\n";
45
$quote_style = ENT_NOQUOTES;
46
var_dump( get_html_translation_table($table, $quote_style) );
52
*** Testing get_html_translation_table() : basic functionality ***