You are here

class EvalMathStack in Webform Calculator 7

Hierarchy

Expanded class hierarchy of EvalMathStack

File

./evalmath.class.php, line 366

View source
class EvalMathStack {
  var $stack = array();
  var $count = 0;
  function push($val) {
    $this->stack[$this->count] = $val;
    $this->count++;
  }
  function pop() {
    if ($this->count > 0) {
      $this->count--;
      return $this->stack[$this->count];
    }
    return null;
  }
  function last($n = 1) {
    return $this->stack[$this->count - $n];
  }

}

Members