PHP5.4 was released four months ago and it seems a little early to see the next version of PHP, but I would like to give you some new features that PHP5.5 will bring.
Note: PHP5.5 is still in the early stages of development, so no one knows what the end result will be. All I'm talking about here is a proposal. In other words, not all new features listed below will be added to PHP5.5. So, don't get too excited:)
The new features and proposals list are quite large and not sorted by importance. So, if you don't want to read through it, here are four features I personally are most excited about:
A simple password hashing API; scalar type hints; getter and setter; generator
Now, let's take a look at the features that PHP5.5 might add:
No longer backwards compatible
First, we will have two changes:
1. Discard support for Windows XP and 2003
PHP5.5 will no longer support Windows XP and 2003, these systems have a history of ten years, so PHP will no longer provide support.
2. Discard e modifier
The e modifier is an indication that the Preg_replace function is used to evaluate the replacement string as PHP code, rather than just a simple string substitution. Unsurprisingly, this kind of behavior will continue to have security problems. This is why using this modifier in PHP5.5 throws a deprecated warning. As an alternative, you should use the Preg_replace_callback function. You can find more information about this change from the RfC.
New functions and classes
Next, we'll see the new functions and classes in the plan:
Boolval ()
PHP has implemented the functions of Strval, Intval, and Floatval. In order to achieve consistency, the Boolval function is added. It can be calculated as a Boolean value or as a callback function.
HASH_PBKDF2 ()
http://www.bkjia.com/PHPjc/445675.html www.bkjia.com true http://www.bkjia.com/PHPjc/445675.html techarticle PHP5.4 was released four months ago and it seems a little early to see the next version of PHP, but I would like to give you some new features that PHP5.5 will bring. Note: PHP5.5 still in ...