This type of error occurs in PHP 8 and higher. This means if you have a function and an optional parameter comes first and then the required param – this deprecation message triggers. Example. Here $a is an optional parameter,
[Fix] deprecated: Required parameter follows optional parameter
![[Fix] deprecated: Required parameter follows optional parameter [Fix] deprecated: Required parameter follows optional parameter](https://sanjeebaryal.com.np/wp-content/uploads/2023/01/Required-Parameter-followed-by-optional-parameter-750x350.png)