.. _structures-globaloutsideloop: .. _global-inside-loop: Global Inside Loop ++++++++++++++++++ The global and `static `_ keywords must be used outside loops. Otherwise, they are evaluated at each loop, slowing the whole process. This is a micro-optimisation. .. code-block:: php Suggestions ___________ * Move the global keyword outside the loop Specs _____ +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/GlobalOutsideLoop | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Performances ` | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+--------------------------------------------------------------------------------------------------------------------------+