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($d); var_dump($l);
based on P7mGQ
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(1) "d" string(1) "a" array(2) { [0]=> string(1) "b" [1]=> string(1) "c" }