Keeping loading times to an absolute minimum is key when creating a website. Visitors who don’t have to wait a long time to access your site have a lower bounce rate and tend to stay longer. This is rewarded by search engines, like Google, in the form of a higher ranking. This fact alone shows that stepping on the gas is a worth­while goal that can offer real results. Op­tim­ising your website’s script language is just one of the many of ways of speeding up a web presence. De­velopers of websites that rely on PHP in par­tic­u­lar have be­ne­fit­ted from an even better per­form­ance since the release of PHP7. This could be improved even further with the recently released successor versions 7.1 and 7.2.

Note

The use of obsolete PHP versions, which will include 7.0 from December 2018, could pose a potential security risk. The PHP community only supports current versions such as PHP 7.1, PHP 7.2, or the future PHP 7.3.

Shortly after the security support for PHP 7.0 expires, so does the official support for the popular PHP 5.6 in December 2018. This signifies that the new version of the scripting language is on its way. Two years after the first release, PHP7 is finally arriving on the internet.

So what is PHP?

PHP is a scripting language used for drafting dynamic websites. The language is shared under the PHP license, which allows users to continue using and changing source code free of charge. Basic PHP functions include reading form data and con­vert­ing it into PHP variables. These variables can be entered into a database or sent via e-mail. PHP is able to support a wide range of database models as well as being able to integrate common web tech­no­lo­gies. In addition, it is used by ap­prox­im­ately 82% of all websites, adding strong and expert-level community support to its list of ad­vant­ages.

Tip

PHP Hosting from IONOS enables you to benefit from the best features of the latest PHP version. If you have any questions, your personal con­sult­ant is always on hand to help.

All PHP codes are processed server-side. This means that PHP scripts—in contrast to JavaS­cript, which is carried out on browsers—are executed directly on the server. When a user sends a request to a server, the re­spect­ive PHP script is sent to the PHP in­ter­pret­er located on the server. The in­ter­pret­er then processes the script and forwards the results to the web server, which sends the page to the browser. Usually HTML documents are created, though other file types can also be present. JPG or PDF documents can be generated and sent to the browser with the help of PHP.

What new features does PHP7 offer?

Since PHP6 was never fully developed, PHP7’s release signalled the end of PHP5 and sim­ul­tan­eously rung in the sixth in­stal­ment of the pro­gram­ming language. The scripting language itself changed little with the release, which is why PHP7 largely remains down­wardly com­pat­ible. This feature allows almost all ap­plic­a­tions, even those designed for previous versions, to run on PHP7. Com­pat­ib­il­ity issues may still arise when dealing with older ex­ten­sions that no longer receive regular updates. The best example for this is the old extension for accessing MySQL databases that is no longer supported in version 7. Switching to the better MySQLi extension or the com­par­able PDO (PHP Data Objects), is therefore re­com­men­ded in such cases.

Perhaps the most at­tract­ive new feature of PHP7 is its per­form­ance boost, which enables de­velopers to better optimise the core of PHP. In addition to the improved speed (PHP7 is about twice as fast as its pre­de­cessor), the new version also takes up less working memory. Not only has the execution of the compiled bytecode been com­pletely renovated, but other core com­pon­ents have also seen fun­da­ment­al changes, including the parser, lexer, and bytecode generator. Instead of drafting code directly out of the parser, PHP7 creates an abstract syntax tree that es­tab­lishes the basis for gen­er­at­ing bytecode commands.

Another feature is that users are now able to define scalar data types - data types that only store one single value – and return types in the program code. In this way, PHP is extended by the integer, Boolean, float, and string types.

The most important features and ad­vant­ages of PHP7
Greatly improved per­form­ance, around twice as fast as PHP5.6
Lower working memory demands
Im­ple­ment­a­tion of an abstract syntax tree for gen­er­at­ing bytecode
Thorough support of 64 bit systems
Improved error handling, errors less fre­quently lead to crashes
Cryp­to­graph­ic­ally secure pseudo-random number generator
Removal of old or redundant ex­ten­sions and server in­ter­faces
Ability to define scalar and return data types

How PHP7 improves the per­form­ance of WordPress and Co.

PHP7’s improved per­form­ance is based on the in­teg­ra­tion of the branch PHPNG (PHP Next Gen­er­a­tion) into the main version of PHP. The branch is char­ac­ter­ised by its re­fact­ored core, which includes the new Zend Engine 3.0.  During the first benchmark tests, prior to the PHP7 release, it became clear that Zend Tech­no­lo­gies’ new version offers numerous ad­vant­ages for online shop solutions, content man­age­ment systems, and frame­works.

Tip

IONOS is the only host that ensures that old PHP versions can run without security problems even after the end of PHP community support. Thanks to PHP extended support, the customer can decide for them­selves when or if they want to convert.

The eCommerce software Magento can be executed at twice the speed of PHP5.6, thereby reducing memory use by around 30%. Ad­di­tion­ally, PHP7 can handle up to three times as many hits from visitors than the preceding version. Results from tests with CMSs (content man­age­ment systems) fare similarly: Drupal 8 increases its speed by 72%, and WordPress tests have shown to require only a quarter of the CPU in­struc­tion required for a hit. Both CMS systems showed an increase of around 50% in terms of possible page views. The frame­works Laravel, Zend, as well as the CRM software, SugarCRM, allow PHP7 to double the amount of hits per second.

In com­par­is­on to earlier versions, PHP7 is able to cope with much higher rates of traffic. This means equipping your setup with robust hardware in order to deal with more visitors may not be necessary. The new PHP7 per­form­ance fulfils the demands required for running WordPress, Magento, or similar projects without gen­er­at­ing ad­di­tion­al costs.

Details on the benchmark data from Zend Tech­no­lo­gies are available in this in­fograph­ic.

Go to Main Menu