.. _structures-unpreprocessed: .. _unpreprocessed-values: Unpreprocessed Values +++++++++++++++++++++ Preprocessing values is the preparation of values before PHP executes the code. There is no macro language in PHP, that prepares the code before compilation, bringing some comfort and short syntax. Most of the time, one uses PHP itself to preprocess data. For example : could be written and avoid preprocessing the string into an array first. Preprocessing could be done anytime the script includes all the needed values to process the expression. This is a micro-optimisation, in particular when the expression is used once. .. code-block:: php Connex PHP features ------------------- + `preprocess `_ + `micro-optimisation `_ Suggestions ___________ * Preprocess the values and hardcode them in PHP. Do not use PHP to calculate something at the last moment. * Use already processed values, or cache to avoid calculating the value each hit. * Create a class that export the data in the right format for every situation, including the developer's comfort. Specs _____ +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Structures/Unpreprocessed | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`Performances ` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Instant (5 mins) | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ClearPHP | `always-preprocess `__ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-zurmo-structures-unpreprocessed`, :ref:`case-piwigo-structures-unpreprocessed` | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+