$a = [1,2,3,4,5,]; $b = array_pop($a);//栈取值 $c = array_shift($a);//队列取值 print_r($b); echo <br>; print_r($c); 输出: 5 1