PHP Classes / Simple RPN Interpreter

Evaluate reverse polish notation expressions

Simple RPN Interpreter PHP Class

This class can be used parse and evaluate RPN (reverse polish notation) expressions. It can parse a mathematical expressions with operands and operators in reverse polish and evaluates the expression. If the expression is split in multiple lines, it can evaluate each line individually. Currently it supports the operators: +, - , *, /, IF, THEN, SWAP, DUP, =, <>, >, <. >= and <= .

Search in PHP Classes

Filter by tags