[php] Which version of CodeIgniter am I currently using?

Quick question.

Is there something similar to a phpinfo() - that would display the version for CodeIgniter?

Thanks.

This question is related to php codeigniter

The answer is


For CodeIgniter 4, use the following:

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

Look for define in system/core/CodeIgniter.php:

define('CI_VERSION', '3.1.8');

Try this code working fine check codeigniter version

Just go to 'system' > 'core' > 'CodeIgniter.php' and look for the lines,

/**
 * CodeIgniter Version
 *
 * @var    string
 *
 */
    define('CI_VERSION', '3.0.0');

Alternate method to check codeigniter version, you can echo the constant value 'CI_VERSION' somewhere in codeigniter controller/view file.

<?php
    echo CI_VERSION;
?>

More Information with demo: how to check codeigniter version


From a controller or view - use the following to display the version:

<?php
   echo CI_VERSION;
?>

You should try :

<?php
echo CI_VERSION;
?>

Or check the file system/core/CodeIgniter.php


Please check the file "system/core/CodeIgniter.php". It is defined in const CI_VERSION = '3.1.10';


you can easily find the current CodeIgniter version by

echo CI_VERSION 


or you can navigate to System->core->codeigniter.php file and you can see the constant

/**
 * CodeIgniter Version
 *
 * @var string
 *
 */
    const CI_VERSION = '3.1.6';