2017 © Pedro Peláez
 

library calc

Library for the calculation of simple math expressions

image

zhuravljov/calc

Library for the calculation of simple math expressions

  • Friday, May 8, 2015
  • by Zhuravljov
  • Repository
  • 1 Watchers
  • 3 Stars
  • 41 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Calculator

Library for the calculation of simple math expressions without using eval()., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

$ composer require zhuravljov/calc

or add, (*4)

"zhuravljov/calc": "*"

to the require section of your composer.json file., (*5)

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 /., (*6)

The Versions

08/05 2015

dev-master

9999999-dev https://github.com/zhuravljov/calc

Library for the calculation of simple math expressions

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

by Roman Zhuravlev

math calculator

08/05 2015

1.0.1

1.0.1.0 https://github.com/zhuravljov/calc

Library for the calculation of simple math expressions

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

by Roman Zhuravlev

math calculator

18/04 2015

1.0

1.0.0.0 https://github.com/zhuravljov/calc

Library for the calculation of simple math expressions

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

by Roman Zhuravlev

math calculator