various documentation and minor refactor
[hiphop-php.git] / hphp / test / zend / good / ext / standard / tests / strings / get_html_translation_table_basic1.php
blob391b160de31e965b95897a23ba1aaba93e36e91f
1 <?hh
2 /* Prototype : array get_html_translation_table ( [int $table [, int $quote_style [, string charset_hint]]] )
3 * Description: Returns the internal translation table used by htmlspecialchars and htmlentities
4 * Source code: ext/standard/html.c
5 */
7 /* Test get_html_translation_table() when table is specified as HTML_ENTITIES */
9 <<__EntryPoint>> function main(): void {
10 echo "*** Testing get_html_translation_table() : basic functionality ***\n";
12 echo "-- with table = HTML_ENTITIES --\n";
13 $table = HTML_ENTITIES;
14 $tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8");
15 asort(inout $tt);
16 var_dump( $tt );
18 echo "-- with table = HTML_SPECIALCHARS --\n";
19 $table = HTML_SPECIALCHARS;
20 $tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8");
21 asort(inout $tt);
22 var_dump( $tt );
24 echo "Done\n";