---
title: "analyse/functions/invalid-pure"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="analyse/functions/invalid-pure" />

In the [`analyse-essential`](/docs/rules/presets/analyse-essential) preset and every stricter one. Report only.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"functions/invalid-pure" = "on"
```

To skip it in some files or lines, add an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`PureFunctionRule`](https://phpstan.org/error-identifiers/impure.betweenPhpTags) (phpstan-classes)
- [`impure.betweenPhpTags`](https://phpstan.org/error-identifiers/impure.betweenPhpTags) (phpstan)
- [`impure.die`](https://phpstan.org/error-identifiers/impure.die) (phpstan)
- [`impure.echo`](https://phpstan.org/error-identifiers/impure.echo) (phpstan)
- [`impure.eval`](https://phpstan.org/error-identifiers/impure.eval) (phpstan)
- [`impure.exit`](https://phpstan.org/error-identifiers/impure.exit) (phpstan)
- [`impure.functionCall`](https://phpstan.org/error-identifiers/impure.functionCall) (phpstan)
- [`impure.global`](https://phpstan.org/error-identifiers/impure.global) (phpstan)
- [`impure.include`](https://phpstan.org/error-identifiers/impure.include) (phpstan)
- [`impure.methodCall`](https://phpstan.org/error-identifiers/impure.methodCall) (phpstan)
- [`impure.new`](https://phpstan.org/error-identifiers/impure.new) (phpstan)
- [`impure.print`](https://phpstan.org/error-identifiers/impure.print) (phpstan)
- [`impure.propertyAssign`](https://phpstan.org/error-identifiers/impure.propertyAssign) (phpstan)
- [`impure.propertyAssignByRef`](https://phpstan.org/error-identifiers/impure.propertyAssignByRef) (phpstan)
- [`impure.propertyUnset`](https://phpstan.org/error-identifiers/impure.propertyUnset) (phpstan)
- [`impure.require`](https://phpstan.org/error-identifiers/impure.require) (phpstan)
- [`impure.static`](https://phpstan.org/error-identifiers/impure.static) (phpstan)
- [`impure.staticPropertyAccess`](https://phpstan.org/error-identifiers/impure.staticPropertyAccess) (phpstan)
- [`impure.superglobal`](https://phpstan.org/error-identifiers/impure.superglobal) (phpstan)
- [`impure.yield`](https://phpstan.org/error-identifiers/impure.yield) (phpstan)
- [`impure.yieldFrom`](https://phpstan.org/error-identifiers/impure.yieldFrom) (phpstan)
- [`possiblyImpure.betweenPhpTags`](https://phpstan.org/error-identifiers/possiblyImpure.betweenPhpTags) (phpstan)
- [`possiblyImpure.die`](https://phpstan.org/error-identifiers/possiblyImpure.die) (phpstan)
- [`possiblyImpure.echo`](https://phpstan.org/error-identifiers/possiblyImpure.echo) (phpstan)
- [`possiblyImpure.eval`](https://phpstan.org/error-identifiers/possiblyImpure.eval) (phpstan)
- [`possiblyImpure.exit`](https://phpstan.org/error-identifiers/possiblyImpure.exit) (phpstan)
- [`possiblyImpure.functionCall`](https://phpstan.org/error-identifiers/possiblyImpure.functionCall) (phpstan)
- [`possiblyImpure.global`](https://phpstan.org/error-identifiers/possiblyImpure.global) (phpstan)
- [`possiblyImpure.include`](https://phpstan.org/error-identifiers/possiblyImpure.include) (phpstan)
- [`possiblyImpure.methodCall`](https://phpstan.org/error-identifiers/possiblyImpure.methodCall) (phpstan)
- [`possiblyImpure.new`](https://phpstan.org/error-identifiers/possiblyImpure.new) (phpstan)
- [`possiblyImpure.print`](https://phpstan.org/error-identifiers/possiblyImpure.print) (phpstan)
- [`possiblyImpure.propertyAssign`](https://phpstan.org/error-identifiers/possiblyImpure.propertyAssign) (phpstan)
- [`possiblyImpure.propertyAssignByRef`](https://phpstan.org/error-identifiers/possiblyImpure.propertyAssignByRef) (phpstan)
- [`possiblyImpure.propertyUnset`](https://phpstan.org/error-identifiers/possiblyImpure.propertyUnset) (phpstan)
- [`possiblyImpure.require`](https://phpstan.org/error-identifiers/possiblyImpure.require) (phpstan)
- [`possiblyImpure.static`](https://phpstan.org/error-identifiers/possiblyImpure.static) (phpstan)
- [`possiblyImpure.staticPropertyAccess`](https://phpstan.org/error-identifiers/possiblyImpure.staticPropertyAccess) (phpstan)
- [`possiblyImpure.superglobal`](https://phpstan.org/error-identifiers/possiblyImpure.superglobal) (phpstan)
- [`possiblyImpure.yield`](https://phpstan.org/error-identifiers/possiblyImpure.yield) (phpstan)
- [`possiblyImpure.yieldFrom`](https://phpstan.org/error-identifiers/possiblyImpure.yieldFrom) (phpstan)
- [`pureFunction.nonOptionalParameterPassed`](https://phpstan.org/error-identifiers/pureFunction.nonOptionalParameterPassed) (phpstan)
- [`pureFunction.parameterByRef`](https://phpstan.org/error-identifiers/pureFunction.parameterByRef) (phpstan)
- [`pureFunction.parameterPassedNotByRef`](https://phpstan.org/error-identifiers/pureFunction.parameterPassedNotByRef) (phpstan)
- [`pureFunction.redundantUnlessCallable`](https://phpstan.org/error-identifiers/pureFunction.redundantUnlessCallable) (phpstan)
- [`pureMethod.nonOptionalParameterPassed`](https://phpstan.org/error-identifiers/pureMethod.nonOptionalParameterPassed) (phpstan)
- [`pureMethod.parameterByRef`](https://phpstan.org/error-identifiers/pureMethod.parameterByRef) (phpstan)
- [`pureMethod.parameterPassedNotByRef`](https://phpstan.org/error-identifiers/pureMethod.parameterPassedNotByRef) (phpstan)
- [`pureMethod.redundantUnlessCallable`](https://phpstan.org/error-identifiers/pureMethod.redundantUnlessCallable) (phpstan)
- [`purePropertyHook.nonOptionalParameterPassed`](https://phpstan.org/error-identifiers/purePropertyHook.nonOptionalParameterPassed) (phpstan)
- [`purePropertyHook.parameterByRef`](https://phpstan.org/error-identifiers/purePropertyHook.parameterByRef) (phpstan)
- [`purePropertyHook.parameterPassedNotByRef`](https://phpstan.org/error-identifiers/purePropertyHook.parameterPassedNotByRef) (phpstan)
- [`purePropertyHook.redundantUnlessCallable`](https://phpstan.org/error-identifiers/purePropertyHook.redundantUnlessCallable) (phpstan)
- [`void.pure`](https://phpstan.org/error-identifiers/void.pure) (phpstan)

[More analyse/functions rules](/docs/rules/analyse/functions) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
