1--TEST-- 2Test get_html_translation_table() function : basic functionality - XHTML 1.0 3--FILE-- 4<?php 5echo "*** Testing get_html_translation_table() : basic functionality/XHTML 1.0 ***\n"; 6 7echo "-- with table = HTML_ENTITIES, ENT_QUOTES --\n"; 8$table = HTML_ENTITIES; 9/* uses ' to share the code path with HTML 4.01 */ 10$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XHTML, "UTF-8"); 11asort( $tt ); 12var_dump( count($tt) ); 13print_r( $tt ); 14 15echo "-- with table = HTML_ENTITIES, ENT_COMPAT --\n"; 16$table = HTML_ENTITIES; 17$tt = get_html_translation_table($table, ENT_COMPAT | ENT_XHTML, "UTF-8"); 18var_dump( count($tt) ); 19 20echo "-- with table = HTML_ENTITIES, ENT_NOQUOTES --\n"; 21$table = HTML_ENTITIES; 22$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XHTML, "UTF-8"); 23var_dump( count($tt) ); 24 25echo "-- with table = HTML_SPECIALCHARS, ENT_COMPAT --\n"; 26$table = HTML_SPECIALCHARS; 27$tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8"); 28asort( $tt ); 29var_dump( count($tt) ); 30print_r( $tt ); 31 32echo "-- with table = HTML_SPECIALCHARS, ENT_QUOTES --\n"; 33$table = HTML_SPECIALCHARS; 34$tt = get_html_translation_table($table, ENT_QUOTES | ENT_XHTML, "UTF-8"); 35asort( $tt ); 36var_dump( $tt ); 37 38echo "-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES --\n"; 39$table = HTML_SPECIALCHARS; 40$tt = get_html_translation_table($table, ENT_NOQUOTES | ENT_XHTML, "UTF-8"); 41asort( $tt ); 42var_dump( $tt ); 43 44 45echo "Done\n"; 46?> 47--EXPECT-- 48*** Testing get_html_translation_table() : basic functionality/XHTML 1.0 *** 49-- with table = HTML_ENTITIES, ENT_QUOTES -- 50int(253) 51Array 52( 53 ['] => ' 54 [Æ] => Æ 55 [Á] => Á 56 [Â] =>  57 [À] => À 58 [Α] => Α 59 [Å] => Å 60 [Ã] => à 61 [Ä] => Ä 62 [Β] => Β 63 [Ç] => Ç 64 [Χ] => Χ 65 [‡] => ‡ 66 [Δ] => Δ 67 [Ð] => Ð 68 [É] => É 69 [Ê] => Ê 70 [È] => È 71 [Ε] => Ε 72 [Η] => Η 73 [Ë] => Ë 74 [Γ] => Γ 75 [Í] => Í 76 [Î] => Î 77 [Ì] => Ì 78 [Ι] => Ι 79 [Ï] => Ï 80 [Κ] => Κ 81 [Λ] => Λ 82 [Μ] => Μ 83 [Ñ] => Ñ 84 [Ν] => Ν 85 [Œ] => Œ 86 [Ó] => Ó 87 [Ô] => Ô 88 [Ò] => Ò 89 [Ω] => Ω 90 [Ο] => Ο 91 [Ø] => Ø 92 [Õ] => Õ 93 [Ö] => Ö 94 [Φ] => Φ 95 [Π] => Π 96 [″] => ″ 97 [Ψ] => Ψ 98 [Ρ] => Ρ 99 [Š] => Š 100 [Σ] => Σ 101 [Þ] => Þ 102 [Τ] => Τ 103 [Θ] => Θ 104 [Ú] => Ú 105 [Û] => Û 106 [Ù] => Ù 107 [Υ] => Υ 108 [Ü] => Ü 109 [Ξ] => Ξ 110 [Ý] => Ý 111 [Ÿ] => Ÿ 112 [Ζ] => Ζ 113 [á] => á 114 [â] => â 115 [´] => ´ 116 [æ] => æ 117 [à] => à 118 [ℵ] => ℵ 119 [α] => α 120 [&] => & 121 [∧] => ∧ 122 [∠] => ∠ 123 [å] => å 124 [≈] => ≈ 125 [ã] => ã 126 [ä] => ä 127 [„] => „ 128 [β] => β 129 [¦] => ¦ 130 [•] => • 131 [∩] => ∩ 132 [ç] => ç 133 [¸] => ¸ 134 [¢] => ¢ 135 [χ] => χ 136 [ˆ] => ˆ 137 [♣] => ♣ 138 [≅] => ≅ 139 [©] => © 140 [↵] => ↵ 141 [∪] => ∪ 142 [¤] => ¤ 143 [⇓] => ⇓ 144 [†] => † 145 [↓] => ↓ 146 [°] => ° 147 [δ] => δ 148 [♦] => ♦ 149 [÷] => ÷ 150 [é] => é 151 [ê] => ê 152 [è] => è 153 [∅] => ∅ 154 [ ] =>   155 [ ] =>   156 [ε] => ε 157 [≡] => ≡ 158 [η] => η 159 [ð] => ð 160 [ë] => ë 161 [€] => € 162 [∃] => ∃ 163 [ƒ] => ƒ 164 [∀] => ∀ 165 [½] => ½ 166 [¼] => ¼ 167 [¾] => ¾ 168 [⁄] => ⁄ 169 [γ] => γ 170 [≥] => ≥ 171 [>] => > 172 [⇔] => ⇔ 173 [↔] => ↔ 174 [♥] => ♥ 175 […] => … 176 [í] => í 177 [î] => î 178 [¡] => ¡ 179 [ì] => ì 180 [ℑ] => ℑ 181 [∞] => ∞ 182 [∫] => ∫ 183 [ι] => ι 184 [¿] => ¿ 185 [∈] => ∈ 186 [ï] => ï 187 [κ] => κ 188 [⇐] => ⇐ 189 [λ] => λ 190 [〈] => ⟨ 191 [«] => « 192 [←] => ← 193 [⌈] => ⌈ 194 [“] => “ 195 [≤] => ≤ 196 [⌊] => ⌊ 197 [∗] => ∗ 198 [◊] => ◊ 199 [] => ‎ 200 [‹] => ‹ 201 [‘] => ‘ 202 [<] => < 203 [¯] => ¯ 204 [—] => — 205 [µ] => µ 206 [·] => · 207 [−] => − 208 [μ] => μ 209 [∇] => ∇ 210 [ ] => 211 [–] => – 212 [≠] => ≠ 213 [∋] => ∋ 214 [¬] => ¬ 215 [∉] => ∉ 216 [⊄] => ⊄ 217 [ñ] => ñ 218 [ν] => ν 219 [ó] => ó 220 [ô] => ô 221 [œ] => œ 222 [ò] => ò 223 [‾] => ‾ 224 [ω] => ω 225 [ο] => ο 226 [⊕] => ⊕ 227 [∨] => ∨ 228 [ª] => ª 229 [º] => º 230 [ø] => ø 231 [õ] => õ 232 [⊗] => ⊗ 233 [ö] => ö 234 [¶] => ¶ 235 [∂] => ∂ 236 [‰] => ‰ 237 [⊥] => ⊥ 238 [φ] => φ 239 [π] => π 240 [ϖ] => ϖ 241 [±] => ± 242 [£] => £ 243 [′] => ′ 244 [∏] => ∏ 245 [∝] => ∝ 246 [ψ] => ψ 247 ["] => " 248 [⇒] => ⇒ 249 [√] => √ 250 [〉] => ⟩ 251 [»] => » 252 [→] => → 253 [⌉] => ⌉ 254 [”] => ” 255 [ℜ] => ℜ 256 [®] => ® 257 [⌋] => ⌋ 258 [ρ] => ρ 259 [] => ‏ 260 [›] => › 261 [’] => ’ 262 [‚] => ‚ 263 [š] => š 264 [⋅] => ⋅ 265 [§] => § 266 [] => ­ 267 [σ] => σ 268 [ς] => ς 269 [∼] => ∼ 270 [♠] => ♠ 271 [⊂] => ⊂ 272 [⊆] => ⊆ 273 [∑] => ∑ 274 [¹] => ¹ 275 [²] => ² 276 [³] => ³ 277 [⊃] => ⊃ 278 [⊇] => ⊇ 279 [ß] => ß 280 [τ] => τ 281 [∴] => ∴ 282 [θ] => θ 283 [ϑ] => ϑ 284 [ ] =>   285 [þ] => þ 286 [˜] => ˜ 287 [×] => × 288 [™] => ™ 289 [⇑] => ⇑ 290 [ú] => ú 291 [↑] => ↑ 292 [û] => û 293 [ù] => ù 294 [¨] => ¨ 295 [ϒ] => ϒ 296 [υ] => υ 297 [ü] => ü 298 [℘] => ℘ 299 [ξ] => ξ 300 [ý] => ý 301 [¥] => ¥ 302 [ÿ] => ÿ 303 [ζ] => ζ 304 [] => ‍ 305 [] => ‌ 306) 307-- with table = HTML_ENTITIES, ENT_COMPAT -- 308int(252) 309-- with table = HTML_ENTITIES, ENT_NOQUOTES -- 310int(251) 311-- with table = HTML_SPECIALCHARS, ENT_COMPAT -- 312int(4) 313Array 314( 315 [&] => & 316 [>] => > 317 [<] => < 318 ["] => " 319) 320-- with table = HTML_SPECIALCHARS, ENT_QUOTES -- 321array(5) { 322 ["&"]=> 323 string(5) "&" 324 ["'"]=> 325 string(6) "'" 326 [">"]=> 327 string(4) ">" 328 ["<"]=> 329 string(4) "<" 330 ["""]=> 331 string(6) """ 332} 333-- with table = HTML_SPECIALCHARS, ENT_NOQUOTES -- 334array(3) { 335 ["&"]=> 336 string(5) "&" 337 [">"]=> 338 string(4) ">" 339 ["<"]=> 340 string(4) "<" 341} 342Done