3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo[]= array('color' => 'red' , 'size' => 'small'); $foo[]= array('color' => 'blue', 'size' => 'large'); $foo[]= array('size' => 'medium'); reset($foo); while (list($key, $val) = each($foo)) { echo "$key => $val\n"; }
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/VA9EG on line 8 0 => Array Notice: Array to string conversion in /in/VA9EG on line 8 1 => Array Notice: Array to string conversion in /in/VA9EG on line 8 2 => Array
Output for 4.3.0 - 5.3.29
0 => Array 1 => Array 2 => Array