CodeIgniter 4 is a rewrite of the framework. On February 24, 2020, which would be Jim Perry’s birthday, CodeIgniter 4 was launched. Between the launch of the first stable version of CodeIgniter 3 and CodeIgniter 4, it took almost 5 years.
The “lean, mean, and simple” philosophy has been retained, but the implementation has a lot of differences, compared to CodeIgniter 3.
CodeIgniter 4 is very different from 3 and below you will see the main differences between them.
1. PHP versions
- CodeIgniter 4 required minimum PHP version 7.2
- CodeIgniter 3 it is possible to use PHP version 5.6 (The developers of PHP are no longer supporting PHP 5.6)
2. Composer
- CodeIgniter 4 can be download in two ways
#1 Available as a ready-to-run zip or tarball.
#2 It can also be installed using Composer - CodeIgniter 3 can not be installed using composer
3. Directory Structure
- CodeIgniter 4 devided into 5 directory /app,/system,/public,/writable,/tests
- CodeIgniter 3 has 2 directories:/application and /system`
4. Namespaces
- CodeIgniter 4 is built for PHP7.2+, and everything in the framework is namespaced, except for the helpers.
- CodeIgniter 3 does not use namespaces.
5. Autoloading
- CodeIgniter 4 has a autoload process of class, by use of namespaces
- CodeIgniter 3 has a manual process to configure most of the files to be loaded.
Thank you for reading and Keep visit here for more latest updates on PHP frameworks.