PHPackages                             carthage-software/cel-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. carthage-software/cel-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

carthage-software/cel-php
=========================

A PHP Common Expression Language Implementation

1.2.1(2mo ago)541.6k↓31.3%2[1 PRs](https://github.com/carthage-software/cel-php/pulls)MITPHPPHP ~8.4 || ~8.5CI passing

Since Oct 21Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/carthage-software/cel-php)[ Packagist](https://packagist.org/packages/carthage-software/cel-php)[ RSS](/packages/carthage-software-cel-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (16)Versions (16)Used By (0)

A Common Expression Language Implementation in PHP
==================================================

[](#a-common-expression-language-implementation-in-php)

[![continuous integration](https://github.com/carthage-software/cel-php/actions/workflows/ci.yml/badge.svg)](https://github.com/carthage-software/cel-php/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/b9fa9fff05eff0fe275ecfa11c8aff0a8b1e6114064a91d5bc4fe6caab6cd55a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f63617274686167652d736f6674776172652f63656c2d7068702f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/carthage-software/cel-php?branch=main)[![Mutation testing badge](https://camo.githubusercontent.com/a982ca7ed79fbfc5ba3205c6cdba0765d6c7306fbf047af2e5ddc93888d3f537/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324663617274686167652d736f66747761726525324663656c2d7068702532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/carthage-software/cel-php/main)[![Total Downloads](https://camo.githubusercontent.com/1cee091343eefdfe37b5952c381373e0d42c04463cdcfbe57e43be69117cf612/68747470733a2f2f706f7365722e707567782e6f72672f63617274686167652d736f6674776172652f63656c2d7068702f642f746f74616c2e737667)](https://packagist.org/packages/carthage-software/cel-php)[![Latest Stable Version](https://camo.githubusercontent.com/7e350f2016366b903d2ddc7247212d61570144181710ead43ad135039abdec60/68747470733a2f2f706f7365722e707567782e6f72672f63617274686167652d736f6674776172652f63656c2d7068702f762f737461626c652e737667)](https://packagist.org/packages/carthage-software/cel-php)[![License](https://camo.githubusercontent.com/b4b9ef76cc99e2db9cc459809c12498f485b6c16893b11fbe71259005c3120a6/68747470733a2f2f706f7365722e707567782e6f72672f63617274686167652d736f6674776172652f63656c2d7068702f6c6963656e73652e737667)](https://packagist.org/packages/carthage-software/cel-php)

This repository contains a PHP implementation of the [Common Expression Language (CEL)](https://github.com/google/cel-spec).

Table of Contents
-----------------

[](#table-of-contents)

- [Documentation](#documentation)
- [Example](#quick-example)
- [Specification Compliance](#specification-compliance)
- [License](#license)
- [Security Policy](#security-policy)
- [Code of Conduct](#code-of-conduct)
- [Contributing](#contributing)
- [Development](#development)
    - [Justfile Recipes](#justfile-recipes)
    - [Local Setup](#local-setup)

Documentation
-------------

[](#documentation)

- [Getting Started](./docs/getting-started.md) - Installation, basic usage, and core concepts
- [Standard Extensions Reference](./docs/extensions.md) - Available functions and operators
- [Caching](./docs/caching.md) - Improve performance with caching
- [Custom Functions](./docs/custom-functions.md) - Extend CEL with your own functions
- [Custom Operators](./docs/custom-operators.md) - Add custom binary and unary operators
- [Value Resolvers](./docs/value-resolvers.md) - Support custom PHP types in CEL

Quick Example
-------------

[](#quick-example)

```
use Cel;

// Simple expression evaluation
$result = Cel\evaluate('1 + 2');
echo $result->getRawValue(); // Output: 3

// With variables
$result = Cel\evaluate('user.age >= 18', ['user' => ['age' => 25]]);
echo $result->getRawValue(); // Output: true
```

See the [examples/](examples/) directory for more usage examples.

Specification Compliance
------------------------

[](#specification-compliance)

CEL-PHP is a **production-ready, fully spec-compliant** implementation of the [Common Expression Language specification](https://github.com/google/cel-spec). All core language features, operators, macros, and standard library functions are implemented and tested.

License
-------

[](#license)

This project is licensed under the terms of the [LICENSE](LICENSE) file.

Security Policy
---------------

[](#security-policy)

For information on security vulnerabilities and how to report them, please refer to our [SECURITY.md](SECURITY.md).

Code of Conduct
---------------

[](#code-of-conduct)

Please review our [CODE\_OF\_CONDUCT.md](CODE_OF_CONDUCT.md) for expected behavior and guidelines for participation.

Acknowledgments
---------------

[](#acknowledgments)

This project was developed by [Carthage Software](https://carthage.software) and is fully funded by [Buhta](https://buhta.com).

We extend our sincere gratitude to **Buhta** for their generous support of open-source software. Their commitment to the PHP ecosystem makes projects like this possible.

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started.

Development
-----------

[](#development)

This project uses `just` for task automation.

### Justfile Recipes

[](#justfile-recipes)

You can see all available commands by running `just --list`. Some common recipes include:

- `just install`: Installs project dependencies.
- `just test`: Runs the test suite.
- `just lint`: Runs linting checks.
- `just verify`: Runs all checks (tests, linting, etc.) to ensure code quality. **Always run `just verify` before pushing any changes.**

### Local Setup

[](#local-setup)

To get started with local development, you'll need to install `just` and `typos`.

**Installing Just:**

If you have Rust and Cargo installed, you can install `just` via Cargo:

```
cargo install just
```

Alternatively, you can find other installation methods in the [Just documentation](https://github.com/casey/just#installation).

**Installing Typos:**

If you have Rust and Cargo installed, you can install `typos` via Cargo:

```
cargo install typos-cli
```

After installing `just` and `typos`, you can install the project dependencies and run verification checks:

```
just install
just verify
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 51.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~36 days

Total

6

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8489d7c85bfa7c637b8e13484f3f659652aea0568b6e7f9e66edeb0649b5a2f1?d=identicon)[azjezz](/maintainers/azjezz)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (28 commits)")[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (24 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (1 commits)")[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/carthage-software-cel-php/health.svg)

```
[![Health](https://phpackages.com/badges/carthage-software-cel-php/health.svg)](https://phpackages.com/packages/carthage-software-cel-php)
```

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

704122.9M10.1k](/packages/illuminate-contracts)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3573.0M23](/packages/phiki-phiki)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
