convert ***sort builtins to use inout instead of references
[hiphop-php.git] / hphp / test / zend / good / ext / standard / tests / strings / get_html_translation_table_basic2.php
bloba26b60d2713b4ccafae608d55aded24a20b0873a
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 //set locale to en_US.UTF-8
10 <<__EntryPoint>> function main(): void {
11 setlocale(LC_ALL, "en_US.UTF-8");
13 echo "*** Testing get_html_translation_table() : basic functionality ***\n";
15 // Calling get_html_translation_table() with all arguments
16 // $table as HTML_ENTITIES and different quote style
17 echo "-- with table = HTML_ENTITIES & quote_style = ENT_COMPAT --\n";
18 $table = HTML_ENTITIES;
19 $quote_style = ENT_COMPAT;
20 $tt = get_html_translation_table($table, $quote_style, "UTF-8");
21 asort(inout $tt );
22 var_dump( $tt );
24 echo "-- with table = HTML_ENTITIES & quote_style = ENT_QUOTES --\n";
25 $quote_style = ENT_QUOTES;
26 $tt = get_html_translation_table($table, $quote_style, "UTF-8");
27 asort(inout $tt );
28 var_dump( $tt );
30 echo "-- with table = HTML_ENTITIES & quote_style = ENT_NOQUOTES --\n";
31 $quote_style = ENT_NOQUOTES;
32 $tt = get_html_translation_table($table, $quote_style, "UTF-8");
33 asort(inout $tt );
34 var_dump( $tt );
37 echo "Done\n";