.. _structures-infiniterecursion: .. _infinite-recursion: Infinite Recursion ++++++++++++++++++ A method is calling itself, with unchanged arguments. This might repeat indefinitely. This rules applies to recursive functions without any condition. This also applies to function which inject the incoming arguments, without modifications. .. code-block:: php 10) { return; } foo($a, $b); } function foo2($a, $b) { ++$a; // $a is modified if ($a > 10) { return; } foo2($a, $b); } ?> Connex PHP features ------------------- + `loop `_ + `recursion `_ + `infinite `_ Suggestions ___________ * Modify arguments before injecting them again in the same method * Use different values when calling the same method Specs _____ +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/InfiniteRecursion | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior ` | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 1.8.6 | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+-------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+-------------------------------------------------------------------------------------------------------------------------+