1--TEST-- 2Test get_html_translation_table() function : basic functionality - charset WINDOWS-1252 3--FILE-- 4<?php 5echo "*** Testing get_html_translation_table() : basic functionality/Windows-1252 ***\n"; 6 7echo "-- with table = HTML_ENTITIES --\n"; 8$table = HTML_ENTITIES; 9$tt = get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252"); 10asort( $tt ); 11var_dump( $tt ); 12 13echo "-- with table = HTML_SPECIALCHARS --\n"; 14$table = HTML_SPECIALCHARS; 15$tt = get_html_translation_table($table, ENT_COMPAT, "WINDOWS-1252"); 16asort( $tt ); 17var_dump( $tt ); 18 19echo "Done\n"; 20?> 21--EXPECT-- 22*** Testing get_html_translation_table() : basic functionality/Windows-1252 *** 23-- with table = HTML_ENTITIES -- 24array(125) { 25 ["�"]=> 26 string(7) "Æ" 27 ["�"]=> 28 string(8) "Á" 29 ["�"]=> 30 string(7) "Â" 31 ["�"]=> 32 string(8) "À" 33 ["�"]=> 34 string(7) "Å" 35 ["�"]=> 36 string(8) "Ã" 37 ["�"]=> 38 string(6) "Ä" 39 ["�"]=> 40 string(8) "Ç" 41 ["�"]=> 42 string(8) "‡" 43 ["�"]=> 44 string(5) "Ð" 45 ["�"]=> 46 string(8) "É" 47 ["�"]=> 48 string(7) "Ê" 49 ["�"]=> 50 string(8) "È" 51 ["�"]=> 52 string(6) "Ë" 53 ["�"]=> 54 string(8) "Í" 55 ["�"]=> 56 string(7) "Î" 57 ["�"]=> 58 string(8) "Ì" 59 ["�"]=> 60 string(6) "Ï" 61 ["�"]=> 62 string(8) "Ñ" 63 ["�"]=> 64 string(7) "Œ" 65 ["�"]=> 66 string(8) "Ó" 67 ["�"]=> 68 string(7) "Ô" 69 ["�"]=> 70 string(8) "Ò" 71 ["�"]=> 72 string(8) "Ø" 73 ["�"]=> 74 string(8) "Õ" 75 ["�"]=> 76 string(6) "Ö" 77 ["�"]=> 78 string(8) "Š" 79 ["�"]=> 80 string(7) "Þ" 81 ["�"]=> 82 string(8) "Ú" 83 ["�"]=> 84 string(7) "Û" 85 ["�"]=> 86 string(8) "Ù" 87 ["�"]=> 88 string(6) "Ü" 89 ["�"]=> 90 string(8) "Ý" 91 ["�"]=> 92 string(6) "Ÿ" 93 ["�"]=> 94 string(8) "á" 95 ["�"]=> 96 string(7) "â" 97 ["�"]=> 98 string(7) "´" 99 ["�"]=> 100 string(7) "æ" 101 ["�"]=> 102 string(8) "à" 103 ["&"]=> 104 string(5) "&" 105 ["�"]=> 106 string(7) "å" 107 ["�"]=> 108 string(8) "ã" 109 ["�"]=> 110 string(6) "ä" 111 ["�"]=> 112 string(7) "„" 113 ["�"]=> 114 string(8) "¦" 115 ["�"]=> 116 string(6) "•" 117 ["�"]=> 118 string(8) "ç" 119 ["�"]=> 120 string(7) "¸" 121 ["�"]=> 122 string(6) "¢" 123 ["�"]=> 124 string(6) "ˆ" 125 ["�"]=> 126 string(6) "©" 127 ["�"]=> 128 string(8) "¤" 129 ["�"]=> 130 string(8) "†" 131 ["�"]=> 132 string(5) "°" 133 ["�"]=> 134 string(8) "÷" 135 ["�"]=> 136 string(8) "é" 137 ["�"]=> 138 string(7) "ê" 139 ["�"]=> 140 string(8) "è" 141 ["�"]=> 142 string(5) "ð" 143 ["�"]=> 144 string(6) "ë" 145 ["�"]=> 146 string(6) "€" 147 ["�"]=> 148 string(6) "ƒ" 149 ["�"]=> 150 string(8) "½" 151 ["�"]=> 152 string(8) "¼" 153 ["�"]=> 154 string(8) "¾" 155 [">"]=> 156 string(4) ">" 157 ["�"]=> 158 string(8) "…" 159 ["�"]=> 160 string(8) "í" 161 ["�"]=> 162 string(7) "î" 163 ["�"]=> 164 string(7) "¡" 165 ["�"]=> 166 string(8) "ì" 167 ["�"]=> 168 string(8) "¿" 169 ["�"]=> 170 string(6) "ï" 171 ["�"]=> 172 string(7) "«" 173 ["�"]=> 174 string(7) "“" 175 ["�"]=> 176 string(8) "‹" 177 ["�"]=> 178 string(7) "‘" 179 ["<"]=> 180 string(4) "<" 181 ["�"]=> 182 string(6) "¯" 183 ["�"]=> 184 string(7) "—" 185 ["�"]=> 186 string(7) "µ" 187 ["�"]=> 188 string(8) "·" 189 ["�"]=> 190 string(6) " " 191 ["�"]=> 192 string(7) "–" 193 ["�"]=> 194 string(5) "¬" 195 ["�"]=> 196 string(8) "ñ" 197 ["�"]=> 198 string(8) "ó" 199 ["�"]=> 200 string(7) "ô" 201 ["�"]=> 202 string(7) "œ" 203 ["�"]=> 204 string(8) "ò" 205 ["�"]=> 206 string(6) "ª" 207 ["�"]=> 208 string(6) "º" 209 ["�"]=> 210 string(8) "ø" 211 ["�"]=> 212 string(8) "õ" 213 ["�"]=> 214 string(6) "ö" 215 ["�"]=> 216 string(6) "¶" 217 ["�"]=> 218 string(8) "‰" 219 ["�"]=> 220 string(8) "±" 221 ["�"]=> 222 string(7) "£" 223 ["""]=> 224 string(6) """ 225 ["�"]=> 226 string(7) "»" 227 ["�"]=> 228 string(7) "”" 229 ["�"]=> 230 string(5) "®" 231 ["�"]=> 232 string(8) "›" 233 ["�"]=> 234 string(7) "’" 235 ["�"]=> 236 string(7) "‚" 237 ["�"]=> 238 string(8) "š" 239 ["�"]=> 240 string(6) "§" 241 ["�"]=> 242 string(5) "­" 243 ["�"]=> 244 string(6) "¹" 245 ["�"]=> 246 string(6) "²" 247 ["�"]=> 248 string(6) "³" 249 ["�"]=> 250 string(7) "ß" 251 ["�"]=> 252 string(7) "þ" 253 ["�"]=> 254 string(7) "˜" 255 ["�"]=> 256 string(7) "×" 257 ["�"]=> 258 string(7) "™" 259 ["�"]=> 260 string(8) "ú" 261 ["�"]=> 262 string(7) "û" 263 ["�"]=> 264 string(8) "ù" 265 ["�"]=> 266 string(5) "¨" 267 ["�"]=> 268 string(6) "ü" 269 ["�"]=> 270 string(8) "ý" 271 ["�"]=> 272 string(5) "¥" 273 ["�"]=> 274 string(6) "ÿ" 275} 276-- with table = HTML_SPECIALCHARS -- 277array(4) { 278 ["&"]=> 279 string(5) "&" 280 [">"]=> 281 string(4) ">" 282 ["<"]=> 283 string(4) "<" 284 ["""]=> 285 string(6) """ 286} 287Done 288