PHPackages                             thesoftwarefarm/exprlib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. thesoftwarefarm/exprlib

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

thesoftwarefarm/exprlib
=======================

An expression parser in PHP

22.9k9[2 issues](https://github.com/TheSoftwareFarm/exprlib/issues)PHP

Since Mar 10Pushed 10y ago2 watchersCompare

[ Source](https://github.com/TheSoftwareFarm/exprlib)[ Packagist](https://packagist.org/packages/thesoftwarefarm/exprlib)[ RSS](/packages/thesoftwarefarm-exprlib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

exprlib - PHP
=============

[](#exprlib---php)

[![Build Status](https://camo.githubusercontent.com/751adbc4f83d4f42f31ae0f7a64883efad4be12462037a1cf1646e7e7a973174/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f546865536f6674776172654661726d2f657870726c69622e706e67)](http://travis-ci.org/TheSoftwareFarm/exprlib)

This library was forked from rezzza/exprlib, since it was abandoned and we think it's still useful.

An expression parser in PHP, code inspired from [codehackit](http://codehackit.blogspot.fr/2011/08/expression-parser-in-php.html)

An alternative to this is [Hoa/Math](https://github.com/hoaproject/Math)

List of functions and features:

- operators = \* + -
- acos
- cos
- sin
- tan
- pow
- sqrt
- log
- exp
- sum
- avg
- min
- max
- if (condition, than, else)
- var placing with {{varName}}

Examples:

```
