3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $l = array('a', 'b', 'c', 'd'); $a = array_pop($l); $d = array_shift($l); var_dump($a); var_dump($b); var_dump($l);
Output for 5.0.4 - 7.1.0
string(1) "d" Notice: Undefined variable: b in /in/P7mGQ on line 6 NULL array(2) { [0]=> string(1) "b" [1]=> string(1) "c" }
Output for 4.3.0 - 5.0.3
string(1) "d" Notice: Undefined variable: b in /in/P7mGQ on line 6 NULL array(2) { [0]=> string(1) "b" [1]=> string(1) "c" }