Core feature
Functions & variables
Use a focused allowlist of math functions and pass values explicitly from your application.
Small allowlist, predictable domains.
Built-ins such as sqrt, sin, cos, ln, and two-argument log are validated for arity and domain before execution. Variables are supplied per call and never read from global PHP state. Register tan, min, or domain-specific functions explicitly when your application needs them.
01
Pass values
Keep user input separate from trusted application data.
02
Register safely
Add a custom function with an explicit name, arity, and callback.