3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $my_array = array(); list($a, $b, $c) = $my_array; echo "I have several animals, a $a, a $b and a $c."; ?>
based on W0RbO
Output for 7.0.0 - 7.3.0rc3
Notice: Undefined offset: 0 in /in/800T2 on line 4 Notice: Undefined offset: 1 in /in/800T2 on line 4 Notice: Undefined offset: 2 in /in/800T2 on line 4 I have several animals, a , a and a .
Output for hhvm-3.15.4
Notice: Undefined index: 0 in /in/800T2 on line 4 Notice: Undefined index: 1 in /in/800T2 on line 4 Notice: Undefined index: 2 in /in/800T2 on line 4 I have several animals, a , a and a .
Output for 5.6.0 - 5.6.30
Notice: Undefined offset: 2 in /in/800T2 on line 4 Notice: Undefined offset: 1 in /in/800T2 on line 4 Notice: Undefined offset: 0 in /in/800T2 on line 4 I have several animals, a , a and a .