3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hello = "hello"; var_dump($hello['abc']); var_dump($hello['0']); var_dump($hello['1abc']); var_dump(intval('abc')); var_dump(intval('0')); var_dump(intval('1abc')); var_dump(intval('12abc')); //var_dump($hello['12abc']);
Output for 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal string offset 'abc' in /in/rnoUK on line 4 string(1) "h" string(1) "h" Notice: A non well formed numeric value encountered in /in/rnoUK on line 6 string(1) "e" int(0) int(0) int(1) int(12)
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.3.29, hhvm-3.10.0 - 3.12.0
string(1) "h" string(1) "h" string(1) "e" int(0) int(0) int(1) int(12)
Output for 5.4.0 - 5.4.45
Warning: Illegal string offset 'abc' in /in/rnoUK on line 4 string(1) "h" string(1) "h" string(1) "e" int(0) int(0) int(1) int(12)
Output for 5.1.0
<br /> <b>Fatal error</b>: fatal flex scanner internal error--end of buffer missed in <b>/in/rnoUK</b> on line <b>10</b><br />
Process exited with code 255.