MIR1703
ImpureStaticVariable
A @pure function uses a static variable.
Example
Section titled “Example”<?php/** @pure */ function f(){ static $n = 0; return ++$n; }How to fix
Section titled “How to fix”Remove the static state, or drop @pure.
MIR1703
A @pure function uses a static variable.
<?php/** @pure */ function f(){ static $n = 0; return ++$n; }Remove the static state, or drop @pure.