3v4l.org

run code in 200+ 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 - 7.1.7
string(1) "d" string(1) "a" array(2) { [0]=> string(1) "b" [1]=> string(1) "c" }