What are the main benefits of the all new PHP 7.2 for Magento sites?
PHP is the most favourite programming language at present for building websites on the internet. Majority of the websites and e-commerce solutions are in love with the PHP technology and why not? After all, it is the most secure programming language that is utilized to build trustworthy web applications.
And when it comes to developing e-commerce websites, Magento is the most successful framework. Magento extends many excellent features like Inventory management, Payment Gateway integration, SEO management, mobile-friendly interface, and product management etc., which makes it the preferred framework for designing e-commerce sites. If you want to operate Magento, then it is important for you to know how to formulate codes in the PHP language.
We all are enthusiastic about Magento 2 and all its new announcements. With each new update, the platform brings in innovative features that overhaul the default e-commerce experience completely. Today we will be talking about the latest major update, yes you guessed it right, get set to leverage the new update of PHP version! With PHP 7.2, you can execute new advancement features while operating on your Magento 2 projects. And this development will influence performance and security in a positive way!
Why You Should Be Using PHP 7.2
PHP lately released the next update in their PHP 7 series. The all-new PHP 7.2 delivers crisp updates which include significant security measures, advanced cryptography, enhancements to the core and faster loading of websites. To ease it for you, our web development experts have broken down the newest attributes and benefits of PHP 7.2 below.
Libsodium is Part of the Core
Who doesn't know about the application-layer cryptography library, Libsodium? It is now a part of the core in PHP 7.2. Earlier, the library was made accessible from PECL, an abbreviation of “PHP Extension Community Library.” With the addition of Libsodium, PHP becomes the first-ever programming language that adds advanced cryptography to its conventional library. With this, it assures the cross-platform and cross-language library, enables signatures, encryption, decryption, password hashing, and many more.
Argon 2 in Password Hash
Argon 2 is well-known for winning the 2015 Password Hashing Competition and also for introducing a reliable alternative to the Bcrypt algorithm used on the earlier version of PHP. Despite having the highest memory filling rate and effective use of various computing units, it provides defence against tradeoff attacks. When compared to Bcrypt which allows for one cost factor, Argon 2 exercises three cost factors: memory cost, time cost, and parallelism factor. The memory cost factor plays an important role in defining the amount of KiB that should be utilized during hashing. Whereas the time cost is crucial in defining the number of iterations of the hashtag algorithm. Lastly, the parallelism factor estimates the number of parallel threads that will be utilized during the hashtag.
According to a paper from Phoronix, PHP 7.2 works 13% faster than 7.1 and 20% faster than 7.0. This makes it the fastest as compared to PHP 5.6, which is still being used by a majority of the WordPress users. There are many other tests that warrant the above findings. As per the benchmarks set by the Official PHP, the PHP 7 is twice as fast as its 5.6 version with half the latency, while there are other benchmarks that prove it to be three times faster.
As we all know that with each new update, there is a depreciation of several features and functions. The same goes for this new update, you can find the complete list of the deprecated functions over here. All these features will run in PHP 7.2, except an error message will appear while use in log files. Developers should make it a point to inspect the code and update any deprecated functions before it becomes impossible for them to revert back.
If we talk about the support, we know that PHP 7.0 brought an end to its security support on December 3rd, 2017. Well don't panic, the critical support will still be open till the end of 2018, but the PHP association will no longer be rendering help for bugs or minor concerns.
PHP 7.1 will implement the above resolution from December 1st, 2018 thus go and upgrade to PHP 7.2 and rest assured, the latest security updates will be sustained by the community.
With important security updates, Libsodium in the core, and immensely enhanced performance features moving on from older versions of PHP to PHP 7.2 is a useful and valuable update. To finish with, we cannot thank Magento enough for making the patches available for everyone! You can find the patches for Magento 1 here.