Sunsetting

Sunsetting a feature is a period of deprecation, where the feature is still available, but is not recommended for usage. It is also displaying a warning message to alert of the disappearance, and offers alternatives.

<?php

    //Deprecated: foo(): Implicitly marking parameter $i as nullable is deprecated, the explicit nullable type must be used instead
    function foo(int $i = null) {}

    #[Deprecated]
    function goo(int $i = null) {}

?>

Documentation

See also How to Sunset a Feature (2025), How to sunset a feature and The Quiet Shift Reshaping PHP Security.

Related : Feature, Deprecation