PageRenderTime 41ms CodeModel.GetById 20ms app.highlight 3ms RepoModel.GetById 17ms app.codeStats 0ms

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

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