PluginProbe
Tracking Code Manager / 2.3.0
Tracking Code Manager v2.3.0
2.8.0 2.7.0 trunk 1.11.8 1.11.9 1.12.0 1.12.1 1.12.2 1.12.3 1.4 1.5 2.0.0 2.0.1 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.2.0 All 29 releases
tracking-code-manager / includes / classes / common / Stack.php
Stack.php
28 lines 576 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit;
3
4 class IRP_Stack {
5 var $array;
6
7 public function __construct() {
8 $this->array=array();
9 }
10
11 public function push($v) {
12 array_push($this->array, $v);
13 }
14 public function pop() {
15 $v=array_pop($this->array);
16 return $v;
17 }
18 public function peek() {
19 return $this->array[count($this->array)-1];
20 }
21 public function size() {
22 return count($this->array);
23 }
24 public function isEmpty() {
25 return (count($this->array)==0);
26 }
27 }
28