PHP is the most popular programming language at present for building websites on the internet. The 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 utilised 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 make 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 code in the PHP language.
We are all 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 the 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 has 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 Magento 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 a cross-platform and cross-language library, enabling 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 utilised 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.
Performance
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 compared to PHP 5.6, which is still being used by a majority of WordPress users. Many other tests warrant the above findings. As per the benchmarks set by the Official PHP, 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.
Deprecations
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 that an error message will appear while using 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.
Support
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. The PHP association will stop offering help for bugs or minor concerns, affecting support moving forward. PHP 7.1 applies this resolution from December 1st 2018, so upgrading to PHP 7.2 keeps security updates.
Summary
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.
Thanks very interesting blog!
Great! Lots of useful information.