Skip to content

Tag reference

@phan-side-effect-free

The @phan-side-effect-free tag declares a function or method as free of side effects.

Grammar

"@phan-side-effect-free" [ <Description> ]

Examples

A method without side effects.
/**
* @phan-side-effect-free
*/
public function isEmpty(): bool

Names by platform

phan
@phan-side-effect-free

Parsing a @phan-side-effect-free tag produces a PhanSideEffectFreeTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

final class PhanSideEffectFreeTag extends FlagTag {}

Defined by Phan.