3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var1 = str_repeat(" ", 4); $var2 = str_repeat(" ", 4); $var1[0] = $var2[0] = "1"; $var1[1] = "2"; $var2[1] = "3"; $var1[2] = $var2[2] = "4"; $var1[3] = $var2[3] = "5"; echo 'Var1: ' . $var1 . ', Var2: ' . $var2;
Output for 4.3.3 - 7.1.0
Var1: 1245, Var2: 1345
Output for 4.3.0 - 4.3.2
Var1: 2, Var2: 1345