DEV Community

Cover image for Is it worth switching to PHP 7?
SERP.run
SERP.run

Posted on

Is it worth switching to PHP 7?

1. PERFORMANCE

In benchmarks, version 7.x works up to 14 times faster than version 5.x, and the speed of pages on WordPress increases by up to 100%, however, developers safely say about an increase in performance from 20 to 70% without changing the page code.

Check other advantages put together for dev.to by Softeris Software House:

2. COMPATIBILITY

Not all CMS or frameworks were immediately ready for PHP 7, but this compatibility appeared over time.

  • Zend Framework - since ver. 2.4+
  • WordPress - since ver. 4.3
  • Drupal - since ver. 8
  • Joomla - since ver. 3.5

3. INTELLIGENT RESOURCES

The increase in efficiency is not only te increase in speed, but also the reduction of resources necessary to launch individual subpages. As a result, website owners can reduce the required infrastructure to some extent, and thus save money.

4. SYNTAX UNIFICATION

One of the many complaints of PHP users was the lack of consistency in syntax. The latest PHP 7 release has finally solved this problem. Many operations have been added that make the sytnax more compact. This will allow to make fuller use of functional programming.

5. EXCEPTIONS INSTEAD OF ERRORS

From version 7, critical errors are engine exceptions, which can be caught and handled like all other exceptions. Wise!

6. SCALAR TYPE DECLARATIONS

A revolutionary change in PHP 7 is the addition of declarations for scalar types, they can be declared strings (integers), integers (int) and floating point (float) and logical types (boolean).

Don't wait! Enter the future today :)

Top comments (2)

Collapse
 
alyve profile image
Alyve

Hello,

I switched to Javascript to PHP few months ago and I don't regret it. I stopped to use PHPΒ since PHP 5, the beginning of POO but I didn't like it because it was missing type hint. Right now, it's just perfect and PHP 8 will be even better.

If you have knowledge about POO, you won't be disappointed with PHP. πŸ™‚

Collapse
 
joelbonetr profile image
JoelBonetR πŸ₯‡

Didn't read the article yet but the answer is definitely yes πŸ˜‚