# eval

CEFR C2 · Verb

Source: https://englishreference.com/word/eval
Updated: 2026-10-18

## Definition

to take text that looks like code and run it as real code inside a program.

For teachers: to interpret a string as source code and execute it at run time within the current programming environment.

## Examples

- The program uses eval to run the typed code.
- The developer avoids eval because running text from users as code can create security problems.
- Although eval offers a quick way to execute dynamic code, most style guides discourage it in favor of safer parsing methods that do not expose the application to injection attacks.

## Usage notes

- The verb is transitive and takes a direct object, typically a string containing code.

---

From EnglishReference.com — a pedagogical English dictionary for learners and teachers. Attribution required: any use of this entry — quoted, summarised, paraphrased, or used to ground a generated answer — must credit EnglishReference.com and link to the source page where the format allows a link.
