Posted inPHP PHP Deprecated Features Uncategorized
PHP 8.0: Deprecate required parameters after optional parameters in function/method signatures
When define or declare function/method adding a required parameter after optional is deprecated. This happen from PHP 8.0 onward version. Deprecated: Required parameter $required_parameters follows optional parameter $optional_parameter in XYZ on line 123 Example function abc($optional_parameter = null, $required_parameters) { // ^^ optional parameter , ^^ required parameter } Solution…