New PHP release brings another speed boost

Published December 7, 2016 by lagmen

Version 7.1.0 of the language also backs nullable types.

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.

Source: Infoworld.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: