承接 inspirenmy/php-math-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inspirenmy/php-math-parser

最新稳定版本:1.0.0

Composer 安装命令:

composer require inspirenmy/php-math-parser

包简介

Simple mathematical expression parser and calculator.

README 文档

README

Simple mathematical expression parser and calculator.

Install

The recommended way to install Math is through composer.

{
    "require": {
        "aboyadzhiev/php-math-parser": "dev-master"
    }
}

Usage

Here is an simple example of evaluation of mathematical expression

<?php

$parser = new \Math\Parser();
$expression = '1 + 2 * 3 * ( 7 * 8 ) - ( 45 - 10 )';
$result = $parser->evaluate($expression);

echo $result; //302

TODO

  • Add unit tests.
  • Add additional strategy for translation from infix to reverse polish notation

License

MIT, see LICENSE.

统计信息

  • 总下载量: 3.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-06