3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); $foo = "hello world"; $bar = $foo['something']; var_dump($foo); var_dump($bar);
based on ONsDi
Output for 5.4.0 - 5.6.38, 7.0.0 - 7.2.11
Warning: Illegal string offset 'something' in /in/p9utn on line 5 string(11) "hello world" string(1) "h"
Output for 4.3.0 - 5.3.29, hhvm-3.10.1 - 3.22.0
string(11) "hello world" string(1) "h"