CodeIgniter Forums

Full Version: Is Codeigniter 3 php 7 ready?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
https://twitter.com/narfbg/status/571295519252877312

We don't need to announce that we've reached compatibility with PHP7 because we've always had it.
Narf, you miss the point.
The point is not what you did, but whether users know it.
(10-08-2015, 05:46 PM)kenjis Wrote: [ -> ]Narf, you miss the point.
The point is not what you did, but whether users know it.

I'm not missing the point, I'm just tired of having to tell people that the Earth is round ...

5.4+ means "5.4 and everything above it", which includes 7 as well - that's basic logic/math. If somebody needs to be explicitly told that 7 is a larger number than 5.4, then quite frankly I'd rather not have them in the CI community.
Nevertheless, when PHP7 is officially released, it would be good to notice on the "Why CodeIgniter?" section that is supports all versions after 5.2.4, including PHP7.
the strange thing with our App is:
According to the profiler PHP 5.6.8 outruns PHP 7 
Our CI App is 10% faster with PHP 5.6.8

every controller or something like that takes about 10% longer.

i'm not sure what this is but in case of interest the tests ran with the following hardware components:
CPU: i7 5930k
RAM : G.Skill RipJaws 4x4 (3200)
MB: Gigabyte GA-X99 UD5 Wifi

Webserver: Apache 2.4.x (VC11)
DB: latest Mysql, MSSQL

After that, i've downloaded a benchmark script from php-benchmark-script.com (not sure if this is relevant, but the code looks not that bad, just running some functions) and the results were strange as you can see below:

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2015-11-11 20:43:09
Server : localhost@127.0.0.1
PHP version : 5.6.8
Platform : WINNT
--------------------------------------
test_math                 : 0.885 sec.
test_stringmanipulation   : 1.726 sec.
test_loops                : 0.539 sec.
test_ifelse               : 0.317 sec.
--------------------------------------
Total time:               : 3.467 sec.


--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2015-11-11 21:09:52
Server : localhost@127.0.0.1
PHP version : 7.0.0rc6
Platform : WINNT
--------------------------------------
test_math                 : 0.274 sec.
test_stringmanipulation   : 1.952 sec.
test_loops                : 0.280 sec.
test_ifelse               : 0.213 sec.
--------------------------------------
Total time:               : 2.719 sec.

It might explain some things because, the stringmanipulation is about 10% slower on PHP7 than on PHP 5.6.x and we do that a lot.
But shouldn't PHP7 be up to twice as fast as PHP 5.6. ?
Be sure that the new version is faster.
The difference at the speed depends only on your code and how it behaves in the 2 versions (this includes and the framework code as well of course)!

* Wait for the Final version before taking any actions.
And I would recommend even to wait a few Fix versions to be pushed before you upgrade your server to the new PHP..
Usually the final new versions are not stable enough and soon after their release there are important to critical fixes added..
yeah but i made this tests since the first alpha one - and nothing critical has changed here so long
i did the first test on 2015-06-23 21:35:52

and the funny thing is the alpha version had a total time of 2.569 sec and was the fastest of all other release candidates
This is not the latest PHP, but (built: Nov 12 2015 00:06:10).

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2015-11-24 22:21:51
Server : @
PHP version : 5.6.16-dev
Platform : Linux
--------------------------------------
test_math                 : 1.142 sec.
test_stringmanipulation   : 1.166 sec.
test_loops                : 0.886 sec.
test_ifelse               : 0.572 sec.
--------------------------------------
Total time:               : 3.766 sec.

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2015-11-24 22:22:18
Server : @
PHP version : 7.0.1-dev
Platform : Linux
--------------------------------------
test_ifelse               : 0.237 sec.
test_loops                : 0.284 sec.
test_stringmanipulation   : 0.534 sec.
test_math                 : 0.375 sec.
--------------------------------------
Total time:               : 1.43 sec.
> But shouldn't PHP7 be up to twice as fast as PHP 5.6. ?

Year, php7 is overall twice faster than php 5.6.

But the benchmarks everybody says are about Linux, not Windows.
I'm not sure Windows php7 is as fast as Linux.

And php7 does not guarantee your app would be twice faster, because apps have many bottle necks.

You can see benchmarks of many apps by Rasmus (about one month ago):
http://talks.php.net/tokyo15#/drupalbench
yeah i did the tests on windows only and thats quite interesting - thx for sharing your results
Pages: 1 2 3