by Victor Rodriguez Bahena
The Internet has changed the world in a way that history has never seen before. Every year new programming languages, tools, and platforms revolutionize what the Internet is capable of. One of the technologies behind this revolution is the hypertext preprocessor, or PHP. PHP is one of the most common programming languages used for website and web application development. PHP is a general purpose, server-side scripting language that was designed to make dynamic pages and applications . The latest numbers show that PHP is used by 82.4% of all websites . Because of this, any performance changes in PHP are extremely important to the industry.
PHP has evolved steadily since its origins in 1994 . With more than 20 years of open source development, PHP has improved both in functionality and performance. With the deployment of PHP 7 in 2016, the world witnessed the first major PHP release in over a decade. This new version comes with many new features, including new operators, better error handling, type declarations, and improvements in execution performance.
In terms of performance, significant collaboration between Intel® and the PHP community leveraged new hardware features that improved processing efficiency and increased the execution speed of PHP 7 . Benchmarks for PHP 7 consistently demonstrated speeds twice as fast as PHP 5.6 . An article in the Phoronix* benchmarking site  reported that PHP 7 delivers an overall performance increase of up to two-and-a-half times that of PHP 5†.
The key changes made in PHP 7 to achieve such great performance are described in the whitepaper, Half the footprint, twice the speed: Accelerating performance for server-side PHP 7 . These changes start with hardware-based optimizations, such as better memory management, more powerful branch miss prediction algorithms, the use of advanced vector extensions (AVX2) technology, and an enhanced fast_memcpy() function optimized using some of Intel's specialized SSE2 instructions.
In the Clear Linux* Project, we want to showcase the best of Intel® Architecture technology and performance, from low-level kernel features to complex applications that span the entire operating system stack. We are fully focused on power and performance optimizations throughout the operating system as a whole. This mission drove our decision to use PHP 7, since we know compiler flags are one of the most important keys to improving the performance of operating systems. The Clear Linux* Project ships with more aggressive defaults, including default compiler flags for faster performance of the resulting binaries.