Deprecated language features are those that have been retained temporarily for backward compatibility, but which will eventually be removed from the language. In effect, deprecation announces a grace period to allow the smooth transition from the old features to the new ones. In that period, no use of the deprecated features should be added to the code, and all existing uses should be gradually removed.
|``++parse_str()++`` without second argument|``++parse_str()++`` with second argument
|``++gmp_random()++``|``++gmp_random_bits()++`` or ``++gmp_random_range()++``
|``++each()++``|``++foreach++``
|``++assert()++`` with string argument|
|Defining case-insensitive constants by calling ``++define()++`` with ``++true++`` as third parameter|``++define("myconst", $value)++`` or ``++define("myconst", $value, false)++``
|``++FILTER_FLAG_SCHEME_REQUIRED++`` and ``++FILTER_FLAG_HOST_REQUIRED++`` flags|``++FILTER_VALIDATE_URL++`` flag
@Ann, I would mention PHP 5 in the title of this rule: "Deprecated functions in PHP 5 should not be used"
And would set the default severity to "Major" as there isn't any operational risk.
=== on 27 Jul 2015, 15:30:28 Ann Campbell wrote:
\[~linda.martin], I've added a note on ``++ereg_replace()++``/``++preg_replace()++`` based on [~alexandre.gigleux]'s comment. Note that I didn't do the research to see which later replacement is available in which later versions