Home > Article > Backend Development > What new features will PHP5.5 bring_PHP Tutorial
PHP5.4 was released four months ago. It seems a little early to look at the next version of PHP, but I still want to reveal to you some of the new features that PHP5.5 will bring.
One note: PHP5.5 is still in the early stages of development, so no one knows what the final result will be. All I'm talking about here are proposals. That said, not all of the new features listed below will be added to PHP 5.5. So, don't get too excited :)
The list of new features and proposals is quite large and not ordered by importance. So, if you don't want to read through it all, here are the four features I'm personally most excited about:
A simple password hashing API; Scalar type hints; Getters and Setter; Generators
Now, let’s take a look at the possible new features in PHP5.5:
No longer backwards compatible
First, we will have two changes:
1. Drop support for Windows XP and 2003
PHP5.5 will no longer support Windows XP and 2003. These systems are already ten years old, so PHP will no longer be supported.
2. Deprecated e modifier
The e modifier is to indicate that the preg_replace function is used to evaluate the replacement string as PHP code, rather than just doing a simple String replacement. Unsurprisingly, this behavior creates a steady stream of security issues. This is why using this modifier in PHP5.5 will throw a deprecation warning. As an alternative, you should use the preg_replace_callback function. You can find more information about this change in the RFC.
New functions and classes
Next, we will see the planned new functions and classes:
boolval()
PHP has implemented the strval, intval and floatval functions. The boolval function will be added for consistency. It can be used completely as a boolean calculation or as a callback function.
hash_pbkdf2()