3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = 'hi'; $a = $x[0]; $b = $x[1]; var_dump($a, $b); list($a, $b) = $x; var_dump($a, $b);
Output for 7.0.0 - 7.2.0
string(1) "h" string(1) "i" NULL NULL
Output for 5.3.18 - 5.6.28
string(1) "h" string(1) "i" string(1) "h" string(1) "i"