PHP Classes

File: example.php

Recommend this page to a friend!
  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: 16 years ago
Size: 310 bytes


Class file image Download

$q=&new queue();

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


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());