<?php // FIFO $queue = new SplQueue(); echo"Enqueuen"; $queue->enqueue('A'); $queue->enqueue('B'); $queue->enqueue('C'); $queue->push('D'); $queue[] = 'E'; foreach($queue as $val) { echo $val."n"; } echo"Dequeuen"; $queue->dequeue(); foreach($queue as $val) { echo $val."n"; } ?>