BIOS
ಠ‿ಠ
- Apr 25, 2012
- 906
- 247
Recently read an article discussing changes in the upcoming 7.2 update, source at bottom for full changes.
RC1 was released on 31 Aug, full release expected 30 November. Anyhow, seems to be full of good stuff so i'll summarize some of the most notable.
Language
object - parameter and return type.
Deprecate bare-wood strings, $foo = bar; will throw a warning, rather than continue with unexpected behavior.
Grouped namespaces - use Foo\Bar\{ Foo, Bar, Baz, };
Counting an object which does not implement Countable will now throw a warning.
Parameter type widening - allows use of scalar type-hints without breaking sub-classes.
Security
"When version 7.2 releases at the end of the year, PHP will be the first programming language to adopt modern cryptography in its standard library."
password_hash() - option added to use Argon2 (i) as hashing algorithm.
The libsodum cryptography library is now part of the core - featuring Argon2i, Scrypt, ECDH, and more.
Deprecations
All of the following will throw warnings in 7.2, most likely be removed in 8.0.
__autoload() - use the more preferred spl_autoload_register()
unset cast - no real use as it's just the same as doing $var = null;
each() - just use foreach
assert(string) - uses eval internally
Links:
RC1 was released on 31 Aug, full release expected 30 November. Anyhow, seems to be full of good stuff so i'll summarize some of the most notable.
Language
object - parameter and return type.
Deprecate bare-wood strings, $foo = bar; will throw a warning, rather than continue with unexpected behavior.
Grouped namespaces - use Foo\Bar\{ Foo, Bar, Baz, };
Counting an object which does not implement Countable will now throw a warning.
Parameter type widening - allows use of scalar type-hints without breaking sub-classes.
Security
"When version 7.2 releases at the end of the year, PHP will be the first programming language to adopt modern cryptography in its standard library."
password_hash() - option added to use Argon2 (i) as hashing algorithm.
The libsodum cryptography library is now part of the core - featuring Argon2i, Scrypt, ECDH, and more.
Deprecations
All of the following will throw warnings in 7.2, most likely be removed in 8.0.
__autoload() - use the more preferred spl_autoload_register()
unset cast - no real use as it's just the same as doing $var = null;
each() - just use foreach
assert(string) - uses eval internally
Links:
You must be registered for see links
.
You must be registered for see links