How to Find Out Version of Codeigniter Framework?

The essential tutorial on finding out the version of the Codeigniter application, whether you have been new or old in laravel application development.

You may require to check the Codeigniter application version that you are currently working on at some point in your dev journey.

Even a simple thing can be tricky if we don’t know the exact solution. In this quick guide, we will decipher some tricks to find out the Codeigniter application version.

We will help you discover the Codeigniter app version through two extremely usable and intelligent techniques.

CodeIgniter Version Check using View File

So, here we are with our first eloquent method; you can check the CodeIgniter’s version using the simple CI_VERSION constant; it has to be injected in the view file.

Once the view is loaded, the CI version constant will manifest the current CodeIgniter version number on your browser screen.

<?php 
   echo \CodeIgniter\CodeIgniter::CI_VERSION;
?>

If you are somehow looking for a similar solution in Codeigniter 3, use the following code to figure out the Codeigniter’s current version.

<?php
    echo CI_VERSION;
?>

Get Codeigniter Present Version

Another method is simple, straight, and hassle-free; just open the app/vendor/codeigniter/framework/system/Codeigniter.php, again look for const CI_VERSION variable.

The CI_VERSION will show you the present version of the CodeIgniter Framework

class CodeIgniter
{
	/**
	 * The current version of CodeIgniter Framework
	*/
	const CI_VERSION = '4.0.4';
}