3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $count = 1; $col = 'A'; while ($count < 300) { echo $count . ' = ' . $col . PHP_EOL; if (isset($col[1])) { echo (ord(strtolower($col[0])) - 96) * 26 + ord(strtolower($col[1])) . PHP_EOL; } else { echo ord(strtolower($col[0])) - 96 . PHP_EOL; } $col++; $count++; }
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0beta1
1 = A 1 2 = B 2 3 = C 3 4 = D 4 5 = E 5 6 = F 6 7 = G 7 8 = H 8 9 = I 9 10 = J 10 11 = K 11 12 = L 12 13 = M 13 14 = N 14 15 = O 15 16 = P 16 17 = Q 17 18 = R 18 19 = S 19 20 = T 20 21 = U 21 22 = V 22 23 = W 23 24 = X 24 25 = Y 25 26 = Z 26 27 = AA 123 28 = AB 124 29 = AC 125 30 = AD 126 31 = AE 127 32 = AF 128 33 = AG 129 34 = AH 130 35 = AI 131 36 = AJ 132 37 = AK 133 38 = AL 134 39 = AM 135 40 = AN 136 41 = AO 137 42 = AP 138 43 = AQ 139 44 = AR 140 45 = AS 141 46 = AT 142 47 = AU 143 48 = AV 144 49 = AW 145 50 = AX 146 51 = AY 147 52 = AZ 148 53 = BA 149 54 = BB 150 55 = BC 151 56 = BD 152 57 = BE 153 58 = BF 154 59 = BG 155 60 = BH 156 61 = BI 157 62 = BJ 158 63 = BK 159 64 = BL 160 65 = BM 161 66 = BN 162 67 = BO 163 68 = BP 164 69 = BQ 165 70 = BR 166 71 = BS 167 72 = BT 168 73 = BU 169 74 = BV 170 75 = BW 171 76 = BX 172 77 = BY 173 78 = BZ 174 79 = CA 175 80 = CB 176 81 = CC 177 82 = CD 178 83 = CE 179 84 = CF 180 85 = CG 181 86 = CH 182 87 = CI 183 88 = CJ 184 89 = CK 185 90 = CL 186 91 = CM 187 92 = CN 188 93 = CO 189 94 = CP 190 95 = CQ 191 96 = CR 192 97 = CS 193 98 = CT 194 99 = CU 195 100 = CV 196 101 = CW 197 102 = CX 198 103 = CY 199 104 = CZ 200 105 = DA 201 106 = DB 202 107 = DC 203 108 = DD 204 109 = DE 205 110 = DF 206 111 = DG 207 112 = DH 208 113 = DI 209 114 = DJ 210 115 = DK 211 116 = DL 212 117 = DM 213 118 = DN 214 119 = DO 215 120 = DP 216 121 = DQ 217 122 = DR 218 123 = DS 219 124 = DT 220 125 = DU 221 126 = DV 222 127 = DW 223 128 = DX 224 129 = DY 225 130 = DZ 226 131 = EA 227 132 = EB 228 133 = EC 229 134 = ED 230 135 = EE 231 136 = EF 232 137 = EG 233 138 = EH 234 139 = EI 235 140 = EJ 236 141 = EK 237 142 = EL 238 143 = EM 239 144 = EN 240 145 = EO 241 146 = EP 242 147 = EQ 243 148 = ER 244 149 = ES 245 150 = ET 246 151 = EU 247 152 = EV 248 153 = EW 249 154 = EX 250 155 = EY 251 156 = EZ 252 157 = FA 253 158 = FB 254 159 = FC 255 160 = FD 256 161 = FE 257 162 = FF 258 163 = FG 259 164 = FH 260 165 = FI 261 166 = FJ 262 167 = FK 263 168 = FL 264 169 = FM 265 170 = FN 266 171 = FO 267 172 = FP 268 173 = FQ 269 174 = FR 270 175 = FS 271 176 = FT 272 177 = FU 273 178 = FV 274 179 = FW 275 180 = FX 276 181 = FY 277 182 = FZ 278 183 = GA 279 184 = GB 280 185 = GC 281 186 = GD 282 187 = GE 283 188 = GF 284 189 = GG 285 190 = GH 286 191 = GI 287 192 = GJ 288 193 = GK 289 194 = GL 290 195 = GM 291 196 = GN 292 197 = GO 293 198 = GP 294 199 = GQ 295 200 = GR 296 201 = GS 297 202 = GT 298 203 = GU 299 204 = GV 300 205 = GW 301 206 = GX 302 207 = GY 303 208 = GZ 304 209 = HA 305 210 = HB 306 211 = HC 307 212 = HD 308 213 = HE 309 214 = HF 310 215 = HG 311 216 = HH 312 217 = HI 313 218 = HJ 314 219 = HK 315 220 = HL 316 221 = HM 317 222 = HN 318 223 = HO 319 224 = HP 320 225 = HQ 321 226 = HR 322 227 = HS 323 228 = HT 324 229 = HU 325 230 = HV 326 231 = HW 327 232 = HX 328 233 = HY 329 234 = HZ 330 235 = IA 331 236 = IB 332 237 = IC 333 238 = ID 334 239 = IE 335 240 = IF 336 241 = IG 337 242 = IH 338 243 = II 339 244 = IJ 340 245 = IK 341 246 = IL 342 247 = IM 343 248 = IN 344 249 = IO 345 250 = IP 346 251 = IQ 347 252 = IR 348 253 = IS 349 254 = IT 350 255 = IU 351 256 = IV 352 257 = IW 353 258 = IX 354 259 = IY 355 260 = IZ 356 261 = JA 357 262 = JB 358 263 = JC 359 264 = JD 360 265 = JE 361 266 = JF 362 267 = JG 363 268 = JH 364 269 = JI 365 270 = JJ 366 271 = JK 367 272 = JL 368 273 = JM 369 274 = JN 370 275 = JO 371 276 = JP 372 277 = JQ 373 278 = JR 374 279 = JS 375 280 = JT 376 281 = JU 377 282 = JV 378 283 = JW 379 284 = JX 380 285 = JY 381 286 = JZ 382 287 = KA 383 288 = KB 384 289 = KC 385 290 = KD 386 291 = KE 387 292 = KF 388 293 = KG 389 294 = KH 390 295 = KI 391 296 = KJ 392 297 = KK 393 298 = KL 394 299 = KM 395