# symfony/expression-language

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/symfony-expression-language).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

2,848 stars · 45 forks · PHP · MIT

## Links

- GitHub: https://github.com/symfony/expression-language
- Homepage: https://symfony.com/expression-language
- awesome-repositories: https://awesome-repositories.com/repository/symfony-expression-language.md

## Topics

`component` `php` `symfony` `symfony-component`

## Description

The expression-language is a lightweight calculation component and parser tool that compiles and evaluates single-line string expressions against runtime variables. It functions as an expression engine that parses logical expressions into executable code or evaluates them directly against provided variables and functions to power dynamic rule evaluation and configuration.

The engine features a complete architecture covering lexical tokenisation, intermediate code generation, and execution caching. It parses expression strings into hierarchical abstract syntax trees to enable programmatic inspection, structural code analysis, and pre-execution error checking. Parsed and compiled statement structures are stored internally to accelerate subsequent executions of identical code blocks without rebuilding.

Extensibility and runtime flexibility are supported through dynamic variable injection, which binds arbitrary runtime data maps into the execution scope for state-aware evaluation. Additionally, a user-defined function registry maintains custom callable extensions that expand the core grammar to support specialized calculation logic and domain-specific requirements.

## Tags

### Programming Languages & Runtimes

- [Expression Evaluators](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators.md) — Parses logical expressions into executable code or evaluates them directly against provided variables and functions. ([source](https://symfony.com/expression-language))
- [Dynamic Variable Injection](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-variable-injection.md) — Binds arbitrary runtime data maps into the execution scope so expressions can evaluate against changing application state.
- [Runtime Code Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/compile-time-expression-evaluation/runtime-code-compilation.md) — Translates expression strings into executable code to run repeated operations quickly without parsing overhead. ([source](https://github.com/symfony/expression-language#readme))
- [PHP Parsers](https://awesome-repositories.com/f/programming-languages-runtimes/php-parsers.md) — Compiles and evaluates single-line string expressions against PHP variables to power dynamic rule evaluation.

### Data & Databases

- [Parsed Code Caching](https://awesome-repositories.com/f/data-databases/data-caching/persistent-binary-caches/parsed-code-caching.md) — Stores compiled and parsed statements internally to accelerate repeated executions of identical code blocks without rebuilding them. ([source](https://symfony.com/doc/current/components/expression_language/introduction.html))

### Development Tools & Productivity

- [Compiler Caches](https://awesome-repositories.com/f/development-tools-productivity/compiler-caches.md) — Caches compiled and parsed statement structures internally to accelerate subsequent executions of identical code blocks.
- [Expression Validators](https://awesome-repositories.com/f/development-tools-productivity/expression-validators.md) — Inspects expression strings and analyzes code for syntax errors and unknown variables before execution to ensure correctness. ([source](https://symfony.com/doc/current/components/expression_language/introduction.html))

### Software Engineering & Architecture

- [Runtime Variable Injections](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/environment-variable-management/environment-variable-injection/runtime-variable-injections.md) — Passes arbitrary data types into expressions to make application state available during execution. ([source](https://symfony.com/doc/current/components/expression_language/introduction.html))
- [Business Rule Evaluation](https://awesome-repositories.com/f/software-engineering-architecture/business-rule-evaluation.md) — Executes boolean conditions and business rules configured at runtime without hardcoding logic into the application codebase.
- [Custom Scripting Functions](https://awesome-repositories.com/f/software-engineering-architecture/custom-scripting-engines/custom-scripting-functions.md) — Adds domain-specific functions and custom variables to an expression engine to support specialized calculation logic.
- [Expression Registries](https://awesome-repositories.com/f/software-engineering-architecture/custom-scripting-engines/custom-scripting-functions/user-defined-transformation-functions/expression-registries.md) — Maintains a lookup table of custom callable extensions that expand the core grammar with specialized domain logic.

### Artificial Intelligence & ML

- [Custom Function Registrations](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/tooling-integration-interfaces/agent-tooling-extensions/custom-function-registrations.md) — Extends the evaluation environment with user-defined functions to support specialized domain logic. ([source](https://symfony.com/doc/current/components/expression_language/introduction.html))
