zhuravljov/calc
最新稳定版本:1.0.1
Composer 安装命令:
composer require zhuravljov/calc
包简介
Library for the calculation of simple math expressions
关键字:
README 文档
README
Library for the calculation of simple math expressions without using eval().
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require zhuravljov/calc
or add
"zhuravljov/calc": "*"
to the require section of your composer.json file.
Usage
$calculator = new \zhuravljov\calc\Calculator(); $calculator->calc('2 + 2 * 2'); // 6 $calculator->calc('(2 + 2) * 2'); // 8 $calculator->calc('(2 + 2'); // CalcException
Available operations +, -, * and /.
统计信息
- 总下载量: 93
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-04-18