.. _functions-funcgetargmodified: .. _func\_get\_arg()-modified: func_get_arg() Modified +++++++++++++++++++++++ `func_get_arg() `_ and `func_get_args() `_ used to report the calling value of the argument until PHP 7. Since PHP 7, it is reporting the value of the argument at calling time, which may have been modified by a previous instruction. This code will display 1 in PHP 7, and 0 in PHP 5. .. code-block:: php Connex PHP features ------------------- + `arbitrary-argument `_ Suggestions ___________ * Use func_get_arg() early in the function. * Avoir mixing func_get_args() and direct access to the parameters. * Avoir using func_get_args() and specifying parameters. * Avoir modifying parameters. Specs _____ +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Short name | Functions/funcGetArgModified | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Rulesets | :ref:`All `, :ref:`Analyze `, :ref:`Changed Behavior `, :ref:`CompatibilityPHP70 ` | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Exakat since | 0.8.4 | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHP Version | All | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Severity | Major | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Time To Fix | Quick (30 mins) | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Changed Behavior | PHP 7.0 - `More `__ | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Precision | High | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Available in | `Entreprise Edition `_, `Exakat Cloud `_ | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+