I am testing CodeIgniter 4, but I am getting this error:
Fatal error: Default value for parameters with a class type hint can only be NULL in C:\xampp\htdocs\CodeIgniter4-develop\system\Config\DotEnv.php on line 121
What am I missing?
I am testing CodeIgniter 4, but I am getting this error:
Fatal error: Default value for parameters with a class type hint can only be NULL in C:\xampp\htdocs\CodeIgniter4-develop\system\Config\DotEnv.php on line 121
What am I missing?
You Need PHP7 for codeigniter4.
If you need to test it you can even use any free hosting server like 000webhosting as i used.
Secondly download latest code from ci4 website now its refined.
Update your PHP Version to PHP7.
I was also encountered with this error but finally got the answer on Codeigniter Forum.
Codeigniter 4 requires php 7.
Verifying that, and then making sure CI works with a clean install from the git repo. Once you see the welcome page then you're good to go. If you are having issues with your own code, then please post that on here. Or post in the repo if you have found a bug in CI4.
Refer to the Documentation:
PHP version 7.0 or newer is required.
https://bcit-ci.github.io/CodeIgniter4/intro/requirements.html
Current GitHub Repo: