change PHP version
Change Global (command line) php version (for laravel): use this command : for more see link below : https://bytexd.com/fix-laravel-return-type-of-illuminatesupportcollectionoffsetexistskey/ Change apache PHP version (for projects which you run with apache):