PHP Classes

Simple RPN Interpreter: Evaluate reverse polish notation expressions

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 736 All time: 4,542 This week: 57Up
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
Age: 67
All time rank: 277873 in Spain Spain
Week rank: 170 Up5 in Spain Spain Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (5)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:736
This week:0
All time:4,542
This week:57Up