PHP code example of phpsimple / queue

1. Go to this page and download the library: Download phpsimple/queue library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phpsimple / queue example snippets


use PhpSimple\Queue;

$queue = new Queue();

for ($i = 0; $i < 10; $i++) {
    $queue->push($i);
}

while ($item = $queue->pop()) {
    var_dump($item);
}