PhpSqlAsp.com RPN Interpreter (NEW)

EXAMPLE OF
RPN INTERPRETER IN PHP

(C) Arturo Gonzalez-Mata Santana

This example read and execute a RPN commands txt file in the server.

"Program" Line
Result
#1
2 12 +
14
#2
8 - 9 *
54
#3
5 / 78 5 + -
-72.2
#4
25 10 * 50 +
300
#5
DUP *
90000
#6
SWAP -
90072.2
#7
23 50 < IF + * then 40 +
90

The Result is 90