Download the PHP package hyperf/rpn without Composer

On this page you can find all versions of the php package hyperf/rpn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rpn

RPN - 逆波兰表示法

RPN 是一种是由波兰数学家扬·武卡谢维奇1920年引入的数学表达式方式,在逆波兰记法中,所有操作符置于操作数的后面,因此也被称为后缀表示法。逆波兰记法不需要括号来标识操作符的优先级。

RPN 逻辑

基本逻辑

实例

中缀表达式 5 + ((1 + 2) * 4) - 3 写作

5 1 2 + 4 * + 3 -

下表给出了该逆波兰表达式从左至右求值的过程,堆栈栏给出了中间值,用于跟踪算法。

输入 操作 堆栈 注释
5 入栈 5
1 入栈 5, 1
2 入栈 5, 1, 2
+ 加法运算 5, 3 1, 2出栈,将结果 3 入栈
4 入栈 5, 3, 4
* 乘法运算 5, 12 3, 4 出栈,将结果 12 入栈
+ 加法运算 17 5, 12 出栈,将结果 17 入栈
3 入栈 17, 3
- 减法运算 14 17, 3 出栈,将结果 14 入栈

计算完成时,栈内只有一个操作数,这就是表达式的结果:14

使用

直接计算 RPN 表达式

设置计算精度

设置变量

中缀表达式转化为后缀表达式

暂时不支持使用变量


All versions of rpn with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hyperf/rpn contains the following files

Loading the files please wait ....