New PHP release brings another speed boost

New PHP release brings another speed boost

The PHP 7 line, which debuted a year ago, has received its first point release upgrade, improving performance and featuring nullable types.

Version 7.1.0 also offers capabilities like a void return type and class constant visibility modifiers. But a key PHP advocate stressed performance. The upgrade "[provides] up to 35 percent better performance in CPU-intensive workloads," said Zeev Suraski, CTO at PHP tools producer Zend.

Nullable types in 7.1 allows a check type to be of some type or null. "Type declarations for parameters and return values can now be marked as nullable by prefixing the type name with a question mark. This signifies that as well as the specified type, null can be passed as an argument, or returned as a value, respectively," documentation states.

Version 7.1 also supports class constant visibility to mirror the behavior of method and property visibility. "Class constant may be defined as public, private or protected. class constants declared without any explicit visibility keyword are defined as public," according to the proposal.

A "void" return type in PHP 7.1 makes it clear that a function performs an action rather than producing a result. An iterable pseudo-type, meanwhile, can be used as a parameter type to indicate that a function requires a set of values while not caring about the form of the value set. "This type is analogous to callable, accepting multiple types instead of one single type," documentation states.

PHP 7.2 is slated to introduce an Argon2 password hash. "Argon2 addresses several key downsides of existing algorithms in that it is designed for the highest memory filling rate, and effective use multiple computing units while still providing defense against tradeoff attacks," the documentation states.

IDG Insider

PREVIOUS ARTICLE

«Hackers wanted

NEXT ARTICLE

With A.I. announcement, Mastercard goes for the hype»
author_image
IDG Connect

IDG Connect tackles the tech stories that matter to you

Add Your Comment

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.

images

Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.

images

Poll

Should companies have Bitcoins on hand in preparation for a Ransomware attack?