A parse error: syntax error, unexpected appears when the PHP interpreter detects a missing element. Most of the time, it is caused by a missing curly bracket “}”. To solve this, it will require you to scan the entire file to find the source of the error
The reason for this error is that your PHP version does not support the str_contains function. str_contains was added starting from PHP 8.0.0. If you are using a PHP version before 8.0.0, you may encounter this error.
To fix this error, you can use the strpos function instead of the str_contains function. strpos checks if a string exists in another string.