Upgrade or not?

I am current building a CMS for our organization. I am using PHP and MySQL. I have recently seen that PHP 7.0 has been released. I am looking for some insight on upgrading to PHP 7.0. I understand all the OOP in PHP I need to get this done with the PHP version I use now, that version being 5.6. I see talk about PHP 5 features getting deprecated. Is this something to worry about if your code does what you need? I am using a server with AWS, and have everything running smooth. I see information for stuff like the need for http2.2. I am wonder if these be changes that I don’t even need? Thanks

One of the big changes was the removal of the mysql_* extension which now leaves just the mysqli_* extension (note the i in there) and PDO for having PHP interact with a MySQL database.

It’s been mentioned that PHP7 uses less resources and is quicker then the 5.x versions of PHP, just the fact that PHP7 uses less resources might well encourage providers of shared hosting to migrate all of their servers to PHP7 sooner rather then latter, so you need to keep that in mind if it’s going to be on a shared server

If you start a new project, especially an enterprise application, Id say yes go for it. If you write a library or a software however, its recommended that you at least support PHP 5.5-5.6.

PHP 5.5 has only one more week of patch support to go before it will be officially dead - so you are probably best off stating 5.6 as the minimum level you support so that your code doesn’t get blamed for any issues that arise in 5.5.

1 Like

As for the need for http2.2, I read this online here.
My server reads:
Server version: Apache/2.4.18 (Amazon)
Is this the higher version? I am confused because I know Apache’s nick name to to be httpd not http. Thanks

You’re talking about different things here.
HTTP is the protocol. 2.2 refers to the version of that protocol.
Apache is the web server software.
HTTPD is a program (demon) running on the web server.

As SpacePhoenix mentioned the major change in php 7 is removal of mysql_* functions. Once you replace those it is likely the code will be compatible with 7. If you’re using any off the wall php extensions you also need to make sure those are available for 7. Other than that though there are very few things that prevent code working on 5.6 from working on 7. None the less, you should always test the upgrade on a local environment before releasing to production.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.