3v4l.org

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

Process exited with code 153.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/ctqGR on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/ctqGR on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/ctqGR on line 6
Process exited with code 255.