Paul Krill
Editor at Large

New PHP release brings another speed boost

news
Dec 6, 20162 mins

Version 7.1.0 of the language also backs nullable types

funny car fast speed turbo boost
Credit: GSenkow

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author