28

In the docs of CodeIgniter it states,

PHP version 5.4 or newer is recommended.

I looked on forums etc. and wasn't able to find a definitive yes/no on this, even though the above sentence implies a 'yes', I wasn't sure if that extended to the (now new) PHP7.

I have tried a simple CI3 example with PHP7, and all I can report is so good, so far.

Jonathan Clark
  • 1,180
  • 1
  • 8
  • 26
  • I wouldn't recommend using PHP v7 with the latest code igniter on a production environment without extensive testing to ensure that no issues will be encountered. So far, I haven't found any issues which affect my particular setup. – ukitconsultant Jun 18 '18 at 04:45
  • Why not? I'd suggest that you haven't had any issues so far because codeigniter *does* support PHP 7. The last version was 6 days ago and the version before that includes fixes for `count` with PHP 7.2... – Jonathan Clark Jun 18 '18 at 08:35

2 Answers2

36

Yes. The latest v3.0.4 changelog explicitly has changes to use PHP7 functionality where it can e.g.

Updated Security Library method get_random_bytes() to use PHP 7’s random_bytes() function when possible.

Update August 2018 There's also items in the change log for 3.1.8 which relate to fixes for PHP 7.2, as well as 3.1.7 which specifically mention fixes for PHP 7

Asif Thebepotra
  • 300
  • 3
  • 10
gabe3886
  • 4,235
  • 3
  • 27
  • 31
  • so why does CI still use my_sql (which has been removed in php7) instead my_sqli ?I had to all the my_sql into my_sqli manually. – Warrio Jun 13 '16 at 16:12
  • 10
    It still have the `mysql_` functionality for added support on older PHP versions. CI3 is built to run on PHP 5.2.4+. You shouldn't have needed to change any parts of the driver, you should have just needed to specify the driver to be mysqli (http://www.codeigniter.com/user_guide/database/configuration.html) – gabe3886 Jun 13 '16 at 16:29
  • current version is 3.1.8 but still they dont have fully php 7 version . – Sampath May 30 '18 at 08:42
10

yes codeigniter3.1.11 support PHP version 5.6 to latest 7.3.

Anjani Barnwal
  • 1,362
  • 1
  • 17
  • 23