PHP Classes
elePHPant
Icontem

Simple RPN Interpreter: Evaluate reverse polish notation expressions

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-08-16 (9 years ago) RSS 2.0 feedNot enough user ratingsTotal: 702 All time: 4,484 This week: 1,081Up
Version License PHP version Categories
rpn 1.0.0GNU General Publi...4.0.0Emulators, Math, Parsers
Description Author

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 <= .

Innovation Award
PHP Programming Innovation award nominee
August 2007
Number 3


Prize: One copy of Delphi for PHP
RPN (Reverse Polish Notation) is a way to present the operands and operators of mathematical expressions.

RPN has been most notably used in Hewlett-Packard scientific calculators.

This class provides a solution to parse and evaluate mathematical expressions presented with RPN.

Manuel Lemos
Picture of Arturo Gonzalez-Mata Santana
Name: Arturo Gonzalez-Mata ... <contact>
Classes: 1 package by
Country: Spain Spain
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file rpn.class.php Class rpn parser
Accessible without login Plain text file example.php Example example of use of rpn.class.php with forms
Accessible without login Plain text file example2.php Example example of use of rpn.class.php with server files
Accessible without login Plain text file license.txt Lic. GPL license for RPN.class
Accessible without login Plain text file RPN.txt Data rpn "program" file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:702
This week:0
All time:4,484
This week:1,081Up