.. _performances-timevsstrtotime: .. _time()-vs-strtotime(): time() Vs strtotime() +++++++++++++++++++++ `time() `_ is actually faster than `strtotime() `_ with 'now' key string. This is a micro-optimisation. Relative gain is real, but small unless the function is used many times. .. code-block:: php Connex PHP features ------------------- + `declare `_ Suggestions ___________ * Replace strtotime() with time(). Do not change strtotime() with other value than 'now'. Specs _____ +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Short name | Performances/timeVsstrtotime | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Changed Behavior `, :ref:`Performances ` | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.7 | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Severity | Minor | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Instant (5 mins) | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Precision | Very high | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Examples | :ref:`case-woocommerce-performances-timevsstrtotime` | +--------------+--------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +--------------+--------------------------------------------------------------------------------------------------------------------------+