1--TEST-- 2Test get_html_translation_table() function : basic functionality - with default args 3--FILE-- 4<?php 5/* Test get_html_translation_table() when table is specified as HTML_ENTITIES */ 6 7 8echo "*** Testing get_html_translation_table() : basic functionality ***\n"; 9 10echo "-- with table = HTML_ENTITIES --\n"; 11$table = HTML_ENTITIES; 12$tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8"); 13asort($tt); 14var_dump( $tt ); 15 16echo "-- with table = HTML_SPECIALCHARS --\n"; 17$table = HTML_SPECIALCHARS; 18$tt = get_html_translation_table($table, ENT_COMPAT, "UTF-8"); 19asort($tt); 20var_dump( $tt ); 21 22echo "Done\n"; 23?> 24--EXPECT-- 25*** Testing get_html_translation_table() : basic functionality *** 26-- with table = HTML_ENTITIES -- 27array(252) { 28 ["Æ"]=> 29 string(7) "Æ" 30 ["Á"]=> 31 string(8) "Á" 32 ["Â"]=> 33 string(7) "Â" 34 ["À"]=> 35 string(8) "À" 36 ["Α"]=> 37 string(7) "Α" 38 ["Å"]=> 39 string(7) "Å" 40 ["Ã"]=> 41 string(8) "Ã" 42 ["Ä"]=> 43 string(6) "Ä" 44 ["Β"]=> 45 string(6) "Β" 46 ["Ç"]=> 47 string(8) "Ç" 48 ["Χ"]=> 49 string(5) "Χ" 50 ["‡"]=> 51 string(8) "‡" 52 ["Δ"]=> 53 string(7) "Δ" 54 ["Ð"]=> 55 string(5) "Ð" 56 ["É"]=> 57 string(8) "É" 58 ["Ê"]=> 59 string(7) "Ê" 60 ["È"]=> 61 string(8) "È" 62 ["Ε"]=> 63 string(9) "Ε" 64 ["Η"]=> 65 string(5) "Η" 66 ["Ë"]=> 67 string(6) "Ë" 68 ["Γ"]=> 69 string(7) "Γ" 70 ["Í"]=> 71 string(8) "Í" 72 ["Î"]=> 73 string(7) "Î" 74 ["Ì"]=> 75 string(8) "Ì" 76 ["Ι"]=> 77 string(6) "Ι" 78 ["Ï"]=> 79 string(6) "Ï" 80 ["Κ"]=> 81 string(7) "Κ" 82 ["Λ"]=> 83 string(8) "Λ" 84 ["Μ"]=> 85 string(4) "Μ" 86 ["Ñ"]=> 87 string(8) "Ñ" 88 ["Ν"]=> 89 string(4) "Ν" 90 ["Œ"]=> 91 string(7) "Œ" 92 ["Ó"]=> 93 string(8) "Ó" 94 ["Ô"]=> 95 string(7) "Ô" 96 ["Ò"]=> 97 string(8) "Ò" 98 ["Ω"]=> 99 string(7) "Ω" 100 ["Ο"]=> 101 string(9) "Ο" 102 ["Ø"]=> 103 string(8) "Ø" 104 ["Õ"]=> 105 string(8) "Õ" 106 ["Ö"]=> 107 string(6) "Ö" 108 ["Φ"]=> 109 string(5) "Φ" 110 ["Π"]=> 111 string(4) "Π" 112 ["″"]=> 113 string(7) "″" 114 ["Ψ"]=> 115 string(5) "Ψ" 116 ["Ρ"]=> 117 string(5) "Ρ" 118 ["Š"]=> 119 string(8) "Š" 120 ["Σ"]=> 121 string(7) "Σ" 122 ["Þ"]=> 123 string(7) "Þ" 124 ["Τ"]=> 125 string(5) "Τ" 126 ["Θ"]=> 127 string(7) "Θ" 128 ["Ú"]=> 129 string(8) "Ú" 130 ["Û"]=> 131 string(7) "Û" 132 ["Ù"]=> 133 string(8) "Ù" 134 ["Υ"]=> 135 string(9) "Υ" 136 ["Ü"]=> 137 string(6) "Ü" 138 ["Ξ"]=> 139 string(4) "Ξ" 140 ["Ý"]=> 141 string(8) "Ý" 142 ["Ÿ"]=> 143 string(6) "Ÿ" 144 ["Ζ"]=> 145 string(6) "Ζ" 146 ["á"]=> 147 string(8) "á" 148 ["â"]=> 149 string(7) "â" 150 ["´"]=> 151 string(7) "´" 152 ["æ"]=> 153 string(7) "æ" 154 ["à"]=> 155 string(8) "à" 156 ["ℵ"]=> 157 string(9) "ℵ" 158 ["α"]=> 159 string(7) "α" 160 ["&"]=> 161 string(5) "&" 162 ["∧"]=> 163 string(5) "∧" 164 ["∠"]=> 165 string(5) "∠" 166 ["å"]=> 167 string(7) "å" 168 ["≈"]=> 169 string(7) "≈" 170 ["ã"]=> 171 string(8) "ã" 172 ["ä"]=> 173 string(6) "ä" 174 ["„"]=> 175 string(7) "„" 176 ["β"]=> 177 string(6) "β" 178 ["¦"]=> 179 string(8) "¦" 180 ["•"]=> 181 string(6) "•" 182 ["∩"]=> 183 string(5) "∩" 184 ["ç"]=> 185 string(8) "ç" 186 ["¸"]=> 187 string(7) "¸" 188 ["¢"]=> 189 string(6) "¢" 190 ["χ"]=> 191 string(5) "χ" 192 ["ˆ"]=> 193 string(6) "ˆ" 194 ["♣"]=> 195 string(7) "♣" 196 ["≅"]=> 197 string(6) "≅" 198 ["©"]=> 199 string(6) "©" 200 ["↵"]=> 201 string(7) "↵" 202 ["∪"]=> 203 string(5) "∪" 204 ["¤"]=> 205 string(8) "¤" 206 ["⇓"]=> 207 string(6) "⇓" 208 ["†"]=> 209 string(8) "†" 210 ["↓"]=> 211 string(6) "↓" 212 ["°"]=> 213 string(5) "°" 214 ["δ"]=> 215 string(7) "δ" 216 ["♦"]=> 217 string(7) "♦" 218 ["÷"]=> 219 string(8) "÷" 220 ["é"]=> 221 string(8) "é" 222 ["ê"]=> 223 string(7) "ê" 224 ["è"]=> 225 string(8) "è" 226 ["∅"]=> 227 string(7) "∅" 228 [" "]=> 229 string(6) " " 230 [" "]=> 231 string(6) " " 232 ["ε"]=> 233 string(9) "ε" 234 ["≡"]=> 235 string(7) "≡" 236 ["η"]=> 237 string(5) "η" 238 ["ð"]=> 239 string(5) "ð" 240 ["ë"]=> 241 string(6) "ë" 242 ["€"]=> 243 string(6) "€" 244 ["∃"]=> 245 string(7) "∃" 246 ["ƒ"]=> 247 string(6) "ƒ" 248 ["∀"]=> 249 string(8) "∀" 250 ["½"]=> 251 string(8) "½" 252 ["¼"]=> 253 string(8) "¼" 254 ["¾"]=> 255 string(8) "¾" 256 ["⁄"]=> 257 string(7) "⁄" 258 ["γ"]=> 259 string(7) "γ" 260 ["≥"]=> 261 string(4) "≥" 262 [">"]=> 263 string(4) ">" 264 ["⇔"]=> 265 string(6) "⇔" 266 ["↔"]=> 267 string(6) "↔" 268 ["♥"]=> 269 string(8) "♥" 270 ["…"]=> 271 string(8) "…" 272 ["í"]=> 273 string(8) "í" 274 ["î"]=> 275 string(7) "î" 276 ["¡"]=> 277 string(7) "¡" 278 ["ì"]=> 279 string(8) "ì" 280 ["ℑ"]=> 281 string(7) "ℑ" 282 ["∞"]=> 283 string(7) "∞" 284 ["∫"]=> 285 string(5) "∫" 286 ["ι"]=> 287 string(6) "ι" 288 ["¿"]=> 289 string(8) "¿" 290 ["∈"]=> 291 string(6) "∈" 292 ["ï"]=> 293 string(6) "ï" 294 ["κ"]=> 295 string(7) "κ" 296 ["⇐"]=> 297 string(6) "⇐" 298 ["λ"]=> 299 string(8) "λ" 300 ["〈"]=> 301 string(6) "⟨" 302 ["«"]=> 303 string(7) "«" 304 ["←"]=> 305 string(6) "←" 306 ["⌈"]=> 307 string(7) "⌈" 308 ["“"]=> 309 string(7) "“" 310 ["≤"]=> 311 string(4) "≤" 312 ["⌊"]=> 313 string(8) "⌊" 314 ["∗"]=> 315 string(8) "∗" 316 ["◊"]=> 317 string(5) "◊" 318 [""]=> 319 string(5) "‎" 320 ["‹"]=> 321 string(8) "‹" 322 ["‘"]=> 323 string(7) "‘" 324 ["<"]=> 325 string(4) "<" 326 ["¯"]=> 327 string(6) "¯" 328 ["—"]=> 329 string(7) "—" 330 ["µ"]=> 331 string(7) "µ" 332 ["·"]=> 333 string(8) "·" 334 ["−"]=> 335 string(7) "−" 336 ["μ"]=> 337 string(4) "μ" 338 ["∇"]=> 339 string(7) "∇" 340 [" "]=> 341 string(6) " " 342 ["–"]=> 343 string(7) "–" 344 ["≠"]=> 345 string(4) "≠" 346 ["∋"]=> 347 string(4) "∋" 348 ["¬"]=> 349 string(5) "¬" 350 ["∉"]=> 351 string(7) "∉" 352 ["⊄"]=> 353 string(6) "⊄" 354 ["ñ"]=> 355 string(8) "ñ" 356 ["ν"]=> 357 string(4) "ν" 358 ["ó"]=> 359 string(8) "ó" 360 ["ô"]=> 361 string(7) "ô" 362 ["œ"]=> 363 string(7) "œ" 364 ["ò"]=> 365 string(8) "ò" 366 ["‾"]=> 367 string(7) "‾" 368 ["ω"]=> 369 string(7) "ω" 370 ["ο"]=> 371 string(9) "ο" 372 ["⊕"]=> 373 string(7) "⊕" 374 ["∨"]=> 375 string(4) "∨" 376 ["ª"]=> 377 string(6) "ª" 378 ["º"]=> 379 string(6) "º" 380 ["ø"]=> 381 string(8) "ø" 382 ["õ"]=> 383 string(8) "õ" 384 ["⊗"]=> 385 string(8) "⊗" 386 ["ö"]=> 387 string(6) "ö" 388 ["¶"]=> 389 string(6) "¶" 390 ["∂"]=> 391 string(6) "∂" 392 ["‰"]=> 393 string(8) "‰" 394 ["⊥"]=> 395 string(6) "⊥" 396 ["φ"]=> 397 string(5) "φ" 398 ["π"]=> 399 string(4) "π" 400 ["ϖ"]=> 401 string(5) "ϖ" 402 ["±"]=> 403 string(8) "±" 404 ["£"]=> 405 string(7) "£" 406 ["′"]=> 407 string(7) "′" 408 ["∏"]=> 409 string(6) "∏" 410 ["∝"]=> 411 string(6) "∝" 412 ["ψ"]=> 413 string(5) "ψ" 414 ["""]=> 415 string(6) """ 416 ["⇒"]=> 417 string(6) "⇒" 418 ["√"]=> 419 string(7) "√" 420 ["〉"]=> 421 string(6) "⟩" 422 ["»"]=> 423 string(7) "»" 424 ["→"]=> 425 string(6) "→" 426 ["⌉"]=> 427 string(7) "⌉" 428 ["”"]=> 429 string(7) "”" 430 ["ℜ"]=> 431 string(6) "ℜ" 432 ["®"]=> 433 string(5) "®" 434 ["⌋"]=> 435 string(8) "⌋" 436 ["ρ"]=> 437 string(5) "ρ" 438 [""]=> 439 string(5) "‏" 440 ["›"]=> 441 string(8) "›" 442 ["’"]=> 443 string(7) "’" 444 ["‚"]=> 445 string(7) "‚" 446 ["š"]=> 447 string(8) "š" 448 ["⋅"]=> 449 string(6) "⋅" 450 ["§"]=> 451 string(6) "§" 452 [""]=> 453 string(5) "­" 454 ["σ"]=> 455 string(7) "σ" 456 ["ς"]=> 457 string(8) "ς" 458 ["∼"]=> 459 string(5) "∼" 460 ["♠"]=> 461 string(8) "♠" 462 ["⊂"]=> 463 string(5) "⊂" 464 ["⊆"]=> 465 string(6) "⊆" 466 ["∑"]=> 467 string(5) "∑" 468 ["¹"]=> 469 string(6) "¹" 470 ["²"]=> 471 string(6) "²" 472 ["³"]=> 473 string(6) "³" 474 ["⊃"]=> 475 string(5) "⊃" 476 ["⊇"]=> 477 string(6) "⊇" 478 ["ß"]=> 479 string(7) "ß" 480 ["τ"]=> 481 string(5) "τ" 482 ["∴"]=> 483 string(8) "∴" 484 ["θ"]=> 485 string(7) "θ" 486 ["ϑ"]=> 487 string(10) "ϑ" 488 [" "]=> 489 string(8) " " 490 ["þ"]=> 491 string(7) "þ" 492 ["˜"]=> 493 string(7) "˜" 494 ["×"]=> 495 string(7) "×" 496 ["™"]=> 497 string(7) "™" 498 ["⇑"]=> 499 string(6) "⇑" 500 ["ú"]=> 501 string(8) "ú" 502 ["↑"]=> 503 string(6) "↑" 504 ["û"]=> 505 string(7) "û" 506 ["ù"]=> 507 string(8) "ù" 508 ["¨"]=> 509 string(5) "¨" 510 ["ϒ"]=> 511 string(7) "ϒ" 512 ["υ"]=> 513 string(9) "υ" 514 ["ü"]=> 515 string(6) "ü" 516 ["℘"]=> 517 string(8) "℘" 518 ["ξ"]=> 519 string(4) "ξ" 520 ["ý"]=> 521 string(8) "ý" 522 ["¥"]=> 523 string(5) "¥" 524 ["ÿ"]=> 525 string(6) "ÿ" 526 ["ζ"]=> 527 string(6) "ζ" 528 [""]=> 529 string(5) "‍" 530 [""]=> 531 string(6) "‌" 532} 533-- with table = HTML_SPECIALCHARS -- 534array(4) { 535 ["&"]=> 536 string(5) "&" 537 [">"]=> 538 string(4) ">" 539 ["<"]=> 540 string(4) "<" 541 ["""]=> 542 string(6) """ 543} 544Done 545