3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d=array(); for ($i = 0; $i < 256; $i++) { $d[chr($i)] = $i; } var_dump($d);
Output for 4.3.5 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(256) { [""]=> int(0) [""]=> int(1) [""]=> int(2) [""]=> int(3) [""]=> int(4) [""]=> int(5) [""]=> int(6) [""]=> int(7) [""]=> int(8) [" "]=> int(9) [" "]=> int(10) [" "]=> int(11) [" "]=> int(12) [" "]=> int(13) [""]=> int(14) [""]=> int(15) [""]=> int(16) [""]=> int(17) [""]=> int(18) [""]=> int(19) [""]=> int(20) [""]=> int(21) [""]=> int(22) [""]=> int(23) [""]=> int(24) [""]=> int(25) [""]=> int(26) [""]=> int(27) [""]=> int(28) [""]=> int(29) [""]=> int(30) [""]=> int(31) [" "]=> int(32) ["!"]=> int(33) ["""]=> int(34) ["#"]=> int(35) ["$"]=> int(36) ["%"]=> int(37) ["&"]=> int(38) ["'"]=> int(39) ["("]=> int(40) [")"]=> int(41) ["*"]=> int(42) ["+"]=> int(43) [","]=> int(44) ["-"]=> int(45) ["."]=> int(46) ["/"]=> int(47) [0]=> int(48) [1]=> int(49) [2]=> int(50) [3]=> int(51) [4]=> int(52) [5]=> int(53) [6]=> int(54) [7]=> int(55) [8]=> int(56) [9]=> int(57) [":"]=> int(58) [";"]=> int(59) ["<"]=> int(60) ["="]=> int(61) [">"]=> int(62) ["?"]=> int(63) ["@"]=> int(64) ["A"]=> int(65) ["B"]=> int(66) ["C"]=> int(67) ["D"]=> int(68) ["E"]=> int(69) ["F"]=> int(70) ["G"]=> int(71) ["H"]=> int(72) ["I"]=> int(73) ["J"]=> int(74) ["K"]=> int(75) ["L"]=> int(76) ["M"]=> int(77) ["N"]=> int(78) ["O"]=> int(79) ["P"]=> int(80) ["Q"]=> int(81) ["R"]=> int(82) ["S"]=> int(83) ["T"]=> int(84) ["U"]=> int(85) ["V"]=> int(86) ["W"]=> int(87) ["X"]=> int(88) ["Y"]=> int(89) ["Z"]=> int(90) ["["]=> int(91) ["\"]=> int(92) ["]"]=> int(93) ["^"]=> int(94) ["_"]=> int(95) ["`"]=> int(96) ["a"]=> int(97) ["b"]=> int(98) ["c"]=> int(99) ["d"]=> int(100) ["e"]=> int(101) ["f"]=> int(102) ["g"]=> int(103) ["h"]=> int(104) ["i"]=> int(105) ["j"]=> int(106) ["k"]=> int(107) ["l"]=> int(108) ["m"]=> int(109) ["n"]=> int(110) ["o"]=> int(111) ["p"]=> int(112) ["q"]=> int(113) ["r"]=> int(114) ["s"]=> int(115) ["t"]=> int(116) ["u"]=> int(117) ["v"]=> int(118) ["w"]=> int(119) ["x"]=> int(120) ["y"]=> int(121) ["z"]=> int(122) ["{"]=> int(123) ["|"]=> int(124) ["}"]=> int(125) ["~"]=> int(126) [""]=> int(127) ["�"]=> int(128) ["�"]=> int(129) ["�"]=> int(130) ["�"]=> int(131) ["�"]=> int(132) ["�"]=> int(133) ["�"]=> int(134) ["�"]=> int(135) ["�"]=> int(136) ["�"]=> int(137) ["�"]=> int(138) ["�"]=> int(139) ["�"]=> int(140) ["�"]=> int(141) ["�"]=> int(142) ["�"]=> int(143) ["�"]=> int(144) ["�"]=> int(145) ["�"]=> int(146) ["�"]=> int(147) ["�"]=> int(148) ["�"]=> int(149) ["�"]=> int(150) ["�"]=> int(151) ["�"]=> int(152) ["�"]=> int(153) ["�"]=> int(154) ["�"]=> int(155) ["�"]=> int(156) ["�"]=> int(157) ["�"]=> int(158) ["�"]=> int(159) ["�"]=> int(160) ["�"]=> int(161) ["�"]=> int(162) ["�"]=> int(163) ["�"]=> int(164) ["�"]=> int(165) ["�"]=> int(166) ["�"]=> int(167) ["�"]=> int(168) ["�"]=> int(169) ["�"]=> int(170) ["�"]=> int(171) ["�"]=> int(172) ["�"]=> int(173) ["�"]=> int(174) ["�"]=> int(175) ["�"]=> int(176) ["�"]=> int(177) ["�"]=> int(178) ["�"]=> int(179) ["�"]=> int(180) ["�"]=> int(181) ["�"]=> int(182) ["�"]=> int(183) ["�"]=> int(184) ["�"]=> int(185) ["�"]=> int(186) ["�"]=> int(187) ["�"]=> int(188) ["�"]=> int(189) ["�"]=> int(190) ["�"]=> int(191) ["�"]=> int(192) ["�"]=> int(193) ["�"]=> int(194) ["�"]=> int(195) ["�"]=> int(196) ["�"]=> int(197) ["�"]=> int(198) ["�"]=> int(199) ["�"]=> int(200) ["�"]=> int(201) ["�"]=> int(202) ["�"]=> int(203) ["�"]=> int(204) ["�"]=> int(205) ["�"]=> int(206) ["�"]=> int(207) ["�"]=> int(208) ["�"]=> int(209) ["�"]=> int(210) ["�"]=> int(211) ["�"]=> int(212) ["�"]=> int(213) ["�"]=> int(214) ["�"]=> int(215) ["�"]=> int(216) ["�"]=> int(217) ["�"]=> int(218) ["�"]=> int(219) ["�"]=> int(220) ["�"]=> int(221) ["�"]=> int(222) ["�"]=> int(223) ["�"]=> int(224) ["�"]=> int(225) ["�"]=> int(226) ["�"]=> int(227) ["�"]=> int(228) ["�"]=> int(229) ["�"]=> int(230) ["�"]=> int(231) ["�"]=> int(232) ["�"]=> int(233) ["�"]=> int(234) ["�"]=> int(235) ["�"]=> int(236) ["�"]=> int(237) ["�"]=> int(238) ["�"]=> int(239) ["�"]=> int(240) ["�"]=> int(241) ["�"]=> int(242) ["�"]=> int(243) ["�"]=> int(244) ["�"]=> int(245) ["�"]=> int(246) ["�"]=> int(247) ["�"]=> int(248) ["�"]=> int(249) ["�"]=> int(250) ["�"]=> int(251) ["�"]=> int(252) ["�"]=> int(253) ["�"]=> int(254) ["�"]=> int(255) }
Output for 4.3.0 - 4.3.4
array(256) { [""]=> int(0) [""]=> int(1) [""]=> int(2) [""]=> int(3) [""]=> int(4) [""]=> int(5) [""]=> int(6) [""]=> int(7) [""]=> int(8) [" "]=> int(9) [" "]=> int(10) [" "]=> int(11) [" "]=> int(12) [" "]=> int(13) [""]=> int(14) [""]=> int(15) [""]=> int(16) [""]=> int(17) [""]=> int(18) [""]=> int(19) [""]=> int(20) [""]=> int(21) [""]=> int(22) [""]=> int(23) [""]=> int(24) [""]=> int(25) [""]=> int(26) [""]=> int(27) [""]=> int(28) [""]=> int(29) [""]=> int(30) [""]=> int(31) [" "]=> int(32) ["!"]=> int(33) ["""]=> int(34) ["#"]=> int(35) ["$"]=> int(36) ["%"]=> int(37) ["&"]=> int(38) ["'"]=> int(39) ["("]=> int(40) [")"]=> int(41) ["*"]=> int(42) ["+"]=> int(43) [","]=> int(44) ["-"]=> int(45) ["."]=> int(46) ["/"]=> int(47) [0]=> int(48) [1]=> int(49) [2]=> int(50) [3]=> int(51) [4]=> int(52) [5]=> int(53) [6]=> int(54) [7]=> int(55) [8]=> int(56) [9]=> int(57) [":"]=> int(58) [";"]=> int(59) ["<"]=> int(60) ["="]=> int(61) [">"]=> int(62) ["?"]=> int(63) ["@"]=> int(64) ["A"]=> int(65) ["B"]=> int(66) ["C"]=> int(67) ["D"]=> int(68) ["E"]=> int(69) ["F"]=> int(70) ["G"]=> int(71) ["H"]=> int(72) ["I"]=> int(73) ["J"]=> int(74) ["K"]=> int(75) ["L"]=> int(76) ["M"]=> int(77) ["N"]=> int(78) ["O"]=> int(79) ["P"]=> int(80) ["Q"]=> int(81) ["R"]=> int(82) ["S"]=> int(83) ["T"]=> int(84) ["U"]=> int(85) ["V"]=> int(86) ["W"]=> int(87) ["X"]=> int(88) ["Y"]=> int(89) ["Z"]=> int(90) ["["]=> int(91) ["\"]=> int(92) ["]"]=> int(93) ["^"]=> int(94) ["_"]=> int(95) ["`"]=> int(96) ["a"]=> int(97) ["b"]=> int(98) ["c"]=> int(99) ["d"]=> int(100) ["e"]=> int(101) ["f"]=> int(102) ["g"]=> int(103) ["h"]=> int(104) ["i"]=> int(105) ["j"]=> int(106) ["k"]=> int(107) ["l"]=> int(108) ["m"]=> int(109) ["n"]=> int(110) ["o"]=> int(111) ["p"]=> int(112) ["q"]=> int(113) ["r"]=> int(114) ["s"]=> int(115) ["t"]=> int(116) ["u"]=> int(117) ["v"]=> int(118) ["w"]=> int(119) ["x"]=> int(120) ["y"]=> int(121) ["z"]=> int(122) ["{"]=> int(123) ["|"]=> int(124) ["}"]=> int(125) ["~"]=> int(126) [""]=> int(127) ["�"]=> int(128) ["�"]=> int(129) ["�"]=> int(130) ["�"]=> int(131) ["�"]=> int(132) ["�"]=> int(133) ["�"]=> int(134) ["�"]=> int(135) ["�"]=> int(136) ["�"]=> int(137) ["�"]=> int(138) ["�"]=> int(139) ["�"]=> int(140) ["�"]=> int(141) ["�"]=> int(142) ["�"]=> int(143) ["�"]=> int(144) ["�"]=> int(145) ["�"]=> int(146) ["�"]=> int(147) ["�"]=> int(148) ["�"]=> int(149) ["�"]=> int(150) ["�"]=> int(151) ["�"]=> int(152) ["�"]=> int(153) ["�"]=> int(154) ["�"]=> int(155) ["�"]=> int(156) ["�"]=> int(157) ["�"]=> int(158) ["�"]=> int(159) ["�"]=> int(160) ["�"]=> int(161) ["�"]=> int(162) ["�"]=> int(163) ["�"]=> int(164) ["�"]=> int(165) ["�"]=> int(166) ["�"]=> int(167) ["�"]=> int(168) ["�"]=> int(169) ["�"]=> int(170) ["�"]=> int(171) ["�"]=> int(172) ["�"]=> int(173) ["�"]=> int(174) ["�"]=> int(175) ["�"]=> int(176) ["�"]=> int(177) ["�"]=> int(178) ["�"]=> int(179) ["�"]=> int(180) ["�"]=> int(181) ["�"]=> int(182) ["�"]=> int(183) ["�"]=> int(184) ["�"]=> int(185) ["�"]=> int(186) ["�"]=> int(187) ["�"]=> int(188) ["�"]=> int(189) ["�"]=> int(190) ["�"]=> int(191) ["�"]=> int(192) ["�"]=> int(193) ["�"]=> int(194) ["�"]=> int(195) ["�"]=> int(196) ["�"]=> int(197) ["�"]=> int(198) ["�"]=> int(199) ["�"]=> int(200) ["�"]=> int(201) ["�"]=> int(202) ["�"]=> int(203) ["�"]=> int(204) ["�"]=> int(205) ["�"]=> int(206) ["�"]=> int(207) ["�"]=> int(208) ["�"]=> int(209) ["�"]=> int(210) ["�"]=> int(211) ["�"]=> int(212) ["�"]=> int(213) ["�"]=> int(214) ["�"]=> int(215) ["�"]=> int(216) ["�"]=> int(217) ["�"]=> int(218) ["�"]=> int(219) ["�"]=> int(220) ["�"]=> int(221) ["�"]=> int(222) ["�"]=> int(223) ["�"]=> int(224) ["�"]=> int(225) ["�"]=> int(226) ["�"]=> int(227) ["�"]=> int(228) ["�"]=> int(229) ["�"]=> int(230) ["�"]=> int(231) ["�"]=> int(232) ["�"]=> int(233) ["�"]=> int(234) ["�"]=> int(235) ["�"]=> int(236) ["�"]=> int(237) ["�"]=> int(238) ["�"]=> int(239) ["�"]=> int(240) ["�"]=> int(241) ["�"]=> int(242) ["�"]=> int(243) ["�"]=> int(244) ["�"]=> int(245) ["�"]=> int(246) ["�"]=> int(247) ["�"]=> int(248) ["�"]=> int(249) ["�"]=> int(250) ["�"]=> int(251) ["�"]=> int(252) ["�"]=> int(253) ["�"]=> int(254) ["�"]=> int(255) }