Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Carlos Blanco Domínguez  >  Polymorphic Queue  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: Polymorphic Queue
Implement a LIFO queue with arrays
Author: By
Last change:
Date: 2006-06-09 16:51
Size: 310 bytes
 

Contents

Class file image Download
<?php
require_once("queue.php");

$q=&new queue();

for(
$i=1;$i<=10$i+=2$q->push($i);

$q->debug();

printf("The top of the queue is %d <br>",$q->top());
printf("The number of elements of the stack is %d <br>",$q->count());


while (!
$q->isempty()) printf("Poped element %d , ",$q->pop());
?>