PHP 8: New features and updates Security Researcher


PHP is a powerful, and widely accessible, open-source programming language that is primarily used in website development. Even though we constantly see a rise in all sorts of different technologies and website-building software, PHP remains one of the most widely used languages, powering a staggering number of websites. The new version, PHP 8, promises to bring even more power and speed allowing for even better results.
Unlike something like JavaScript, which is client-side, PHP is server-side. When the browser requests information from the server, the server executes the code and sends the result to the client. The browser then uses this information to create a web page. PHP is relatively easy to learn, fast, and compatible with almost all browsers making it a powerful tool for developers of all kinds.
About the author
Hristo Pandjarov is WordPress Initiatives Manager at SiteGround
What are the PHP 8 improvements and features?
PHP 8 went live on November 26 and will introduce a lot of improvements in speed, security and cleanness of code:
Faster Code Execution: PHP 8 is the first PHP version that has a compiler – JIT – that caches your interpreted code and generates a machine code as an output. The JIT, or “just in time” compiler promises speed improvements for complex tasks and algorithms and opens new opportunities for the PHP language to broaden its reach and applications.
Code with Higher Quality: One of the major differences you will notice with PHP 8 is that many of the warnings and notices that were hard to catch are now classified as code exceptions or errors, which can be caught and logged. It is possible that due to this update, a lot of problems that remained hidden as notices with the previous PHP versions will now surface.
Cleaner, Shorter Code: Some of the new elements, such as the null safe operator, greatly improve the readability of the code, making it shorter and neater. The null safe operator provides functionality similar to null coalescing, but also supports method calls. Instead of nesting several “if statements” you can use the “null” operator to write all those in just 1 line of code.
The “Union Type” Trend: In versions prior to PHP 8.0, you could only declare a single type for properties, parameters, and return types. In this latest release, there is a feature called “union types” that are a collection of two or more types which indicate that either one of those can be used. A union type essentially declares an OR condition for multiple types in the argument type, return type or property type declaration.
The release candidate version has been available for testing for a while now. Most quality website hosting companies should already have an option for developers to test it on their platform. Since major versions often include changes that might break backward compatibility, it’s better to test the release candidate version as early as possible, and prepare your code if you want to get all the benefits of the latest update.
Keeping up with the latest PHP versions is essential if you want to have fast and secure code. PHP 8 is a major and highly anticipated update, but before upgrading, it is strongly recommended to test it on a Staging version of your website first, in order to fix any incompatibility or errors in advance. For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes.
PHP is a powerful, and widely accessible, open-source programming language that is primarily used in website development. Even though we constantly see a rise in all sorts of different technologies and website-building software, PHP remains one of the most widely used languages, powering a staggering number of websites. The new…
Recent Posts
- FTC Chair praises Justice Thomas as ‘the most important judge of the last 100 years’ for Black History Month
- HP acquires Humane AI assets and the AI pin may suffer a humane death
- HP acquires Humane Ai and gives the AI pin a humane death
- DOGE can keep accessing government data for now, judge rules
- Humane’s AI Pin: all the news about the dead AI-powered wearable
Archives
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- September 2018
- October 2017
- December 2011
- August 2010