3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array('a', 'b', 'c', 'd'); list(, $b, $c) = $arr; var_dump($b, $c); list(, , $c) = $arr; var_dump($c); list(, , $c, $d) = $arr; var_dump($c, $d); list(, , , $d) = $arr; var_dump($d);
based on 06pZh
Output for 5.5.0 - 7.2.6
string(1) "b" string(1) "c" string(1) "c" string(1) "c" string(1) "d" string(1) "d"