Home » PHP » What’s New in PHP 7.2: Literally Better Everything

About Traven West

Traven West
Traven is a security-minded programmer who loves to study psychology and philosophy also. He loves to chat about programming, cybersecurity, and the questions of life. He is the Lead Author of TheLastTechie and a freelance web developer in his free time.

What’s New in PHP 7.2: Literally Better Everything

As we all know, most web developers love and hate PHP with a passion. I’m one of those developers that absolutely love it. I know PHP like the back of my hand. Now, since 7.2 has been released, my love is growing even more! Let’s talk about the awesomeness that the newest version brings to us.

Security is the Most Important Thing Here

The 7.2 Release offers some highly needed improvements to security.

  1. The Libsodium cryptography library, for authenticated encryption and high-speed elliptic cryptography, is now a core extension. I’ve been waiting for this to happen for a while now.
  2. The Argon2 algorithm for hashing passwords addresses my personal downsides of the current algorithms, in that they were designed for the highest memory filling rate.
  3. Bye bye Mcrypt. The Mcrypt cryptography library extension has been officially removed. PHP’s developers have said that Mcrypt greatly inhibited the growth of the PHP language and served as “abandonware.”
  4. SSL/TLS (Secure Sockets Layer/Transport Layer Security) constants have been improved.

Improved Programming Language Features

There are other updates to help fix some people’s complaints about the language. So, here we go.

  1. A new warning has been added when calling the count () function with a parameter that is a scalar, a parameter that is null, or an object that does not implement the Countable interface.
  2. Object typehints fix a situation in which a developer can’t declare a function that needs to be passed an object as a parameter or declare that a function should return an object. The fix uses object as a parameter type and as a return type.
  3. HashContext as Object migrates the hash extension to use an object extension for hash contexts instead of using resources.
  4. Conversion of numeric keys in object/array casts addresses an issue with the Zend Engine, which powers PHP 7. The engine has cases in which array hash tables can contain numeric strings, while object hash tables can have integer keys. In such cases, PHP code can’t find the keys. With the fix in PHP 7.2, keys of arrays or object hash tables are converted as appropriate, so numeric string property names in objects become integer array keys and vice versa, solving the issue of inaccessible properties.
Published on Web Code Geeks with permission by Traven West, partner at our WCG program. See the original article here: What’s New in PHP 7.2: Literally Better Everything

Opinions expressed by Web Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
1 Comment Views Tweet it!
Do you want to know how to develop your skillset to become a Web Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. Building web apps with Node.js
2. HTML5 Programming Cookbook
3. CSS Programming Cookbook
4. AngularJS Programming Cookbook
5. jQuery Programming Cookbook
6. Bootstrap Programming Cookbook
and many more ....
Email address:

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
pardeep Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
pardeep
Guest

Great! knowledge how to use new features.

Pardeep is a PHP Community Manager at Cloudways – A Managed PHP Hosting Platform. He love to work on Open source platform , Frameworks and working on new ideas.