Skip to content

MIR1703

ImpureStaticVariable

A @pure function uses a static variable.

<?php
/** @pure */ function f(){ static $n = 0; return ++$n; }

Remove the static state, or drop @pure.