I need to change the php 8.2 to 7.4

Website URL

https://governmentsurvey.free.nf/?i=1

Error Message

Fatal error : Cannot redeclare str_contains() in /home/vol4_4/infinityfree.com/if0_35664757/htdocs/helpers/Functions.php on line 526

Hi and welcome to the forum

In fact str_contains() it doesn’t even exist on v7
so you should stay on v8

maybe this will help you


if that’s your name for function (before it was introduced in php8)
then rename it to something else XYstr_contains() so that it doesn’t conflict



9 Likes

Judging by the function name and the file it’s in, I’m guessing you are using Laravel on your site?

If so, please upgrade your site to Laravel 8 or newer. Laravel 7 and below do not work on PHP 8, so you’ll need to update your site so you can run it on modern PHP versions.

11 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.