[Fix] strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

[Fix] strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

Since PHP 8.1, passing null to parameter #1 is deprecated. Example: when using strpos() to find the occurrence of the specific word in the string. In case of $value being null — the above deprecated message will appear. Fix: –

[Fix] Creation of dynamic property is deprecated since PHP 8.2

[Fix] Creation of dynamic property is deprecated since PHP 8.2

Since PHP 8.2, adding a new property to an object at runtime is deprecated, and such that you shouldn’t do this anymore. Example: When you do this, the property $tiems is dynamically created as untyped public properties, but in the future, you

[Fix] deprecated: Required parameter follows optional parameter

[Fix] deprecated: Required parameter follows optional parameter

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,