PageRenderTime 202ms CodeModel.GetById 161ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/hphp/test/zend/bad/ext/standard/tests/strings/get_html_translation_table_basic8.php

http://github.com/facebook/hiphop-php
PHP | 42 lines | 34 code | 8 blank | 0 comment | 0 complexity | 4624acfb93d6aee42aebc6f2550730aa MD5 | raw file
 1<?php
 2echo "*** Testing get_html_translation_table() : basic functionality/XML 1.0 ***\n";
 3
 4echo "-- with table = HTML_ENTITIES, ENT_QUOTES --\n";
 5$table = HTML_ENTITIES;
 6$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XML1, "UTF-8");
 7asort( $tt );
 8var_dump( count($tt) );
 9print_r( $tt );
10
11echo "-- with table = HTML_ENTITIES, ENT_COMPAT --\n";
12$table = HTML_ENTITIES;
13$tt = get_html_translation_table($table, ENT_COMPAT | ENT_XML1, "UTF-8");
14var_dump( count($tt) );
15
16echo "-- with table = HTML_ENTITIES, ENT_NOQUOTES --\n";
17$table = HTML_ENTITIES;
18$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XML1, "UTF-8");
19var_dump( count($tt) );
20
21echo "-- with table = HTML_SPECIALCHARS, ENT_COMPAT --\n";
22$table = HTML_SPECIALCHARS; 
23$tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8");
24asort( $tt );
25var_dump( count($tt) );
26print_r( $tt );
27
28echo "-- with table = HTML_SPECIALCHARS, ENT_QUOTES --\n";
29$table = HTML_SPECIALCHARS;
30$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XML1, "UTF-8");
31asort( $tt );
32var_dump( $tt );
33
34echo "-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES --\n";
35$table = HTML_SPECIALCHARS;
36$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XML1, "UTF-8");
37asort( $tt );
38var_dump( $tt );
39
40
41echo "Done\n";
42?>