1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [/e (Eval (deprecated))](<https://delaparra-services.nl/knowledge-hub/e-eval-deprecated>)

  

Category: Regex flags 

# /e (Eval (deprecated))

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is /e (Eval (deprecated))?

 

/e (Eval (deprecated)): A historical PHP modifier that evaluated the replacement string as PHP code inside preg\_replace(). The ` e ` modifier once made PHP's ` preg_replace() ` run the replacement as PHP code. It was deprecated in PHP 5.5 and removed in PHP 7.0, because it was a common source of remote code execution bugs. The danger was simple. If any part of the matched text came from a user, an attacker could craft input that ended up being executed on your server.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about /e (Eval (deprecated))

  

### What should you keep in mind with /e (Eval (deprecated))?

 

If you find ` /e ` in old code, replace it with ` preg_replace_callback() `. You pass a function that receives the match and returns the replacement, so the result is computed in normal PHP code and user input is only ever treated as data. Legacy code that still uses ` /e ` will not run on any supported PHP version, so finding it usually means the project needs a broader upgrade. That is worth knowing before you estimate the work.

 

## At a glance

   CategoryRegex flags Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Regex flags terms

 

- [/a (ASCII-only)](<https://delaparra-services.nl/knowledge-hub/a-ascii-only>) 
- [/D (Dollar End Only)](<https://delaparra-services.nl/knowledge-hub/d-dollar-end-only>) 
- [/d (hasIndices)](<https://delaparra-services.nl/knowledge-hub/d-hasindices>) 
- [/g (Global)](<https://delaparra-services.nl/knowledge-hub/g-global>) 
- [/I (Case-Insensitive (POSIX / grep))](<https://delaparra-services.nl/knowledge-hub/i-case-insensitive-posix-grep>) 
- [/i (Case-Insensitive)](<https://delaparra-services.nl/knowledge-hub/i-case-insensitive>)

 

[All terms starting with a number or symbol](<https://delaparra-services.nl/knowledge-hub#letter-other>)

 

## Skills

 

- ### Regex flags across languages

 

Use when writing, porting or debugging a regular expression and its flags/modifiers across languages and tools - JavaScript (g i m s u v y d), PCRE/PHP (i m s x u A D U J), Python re (re.I, re.M, re.S, re.X, re.A), .NET (RegexOptions), POSIX grep/sed. Also use for Laravel \`regex:\` validation rules and for catastrophic backtracking risks.

 [View skill](<https://delaparra-services.nl/skills/regex-flags-cross-language>) [Download zip](<https://delaparra-services.nl/skills/regex-flags-cross-language/download>) 
- ### Regex builder

 

Use when the user asks to create, debug, explain, validate, or optimize a regular expression or replacement for a specific engine. Verifies representative matches, non-matches, captures, escaping, portability limits, and backtracking risk in the target runtime.

 [View skill](<https://delaparra-services.nl/skills/regex-builder>) [Download zip](<https://delaparra-services.nl/skills/regex-builder/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/e-eval-deprecated/skills.zip>)

 

## Manuals

 

- [Regex for beginners](<https://delaparra-services.nl/manuals/regex-voor-beginners>) 
- [Installing Visual Studio Code](<https://delaparra-services.nl/manuals/visual-studio-code-installeren>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/e-eval-deprecated)
