Paul Krill
Editor at Large

Leaner, meaner PHP 7 promises huge performance boost

news analysis
Dec 4, 20153 mins

Language founder Rasmus Lerdorf says lower memory usage provides a 100 percent speedup in most real-world applications

car race speed fastlane winning
Credit: Thinkstock

PHP 7.0.0, released yesterday after two years in development and eight release candidates, brings with it a doubling of performance said Rasmus Lerdorf, the founder of the language.

In an interview with InfoWorld this week, Lerdorf talked about what to expect from the upgrade to the popular server-side scripting language used in Web development. “On most real-world applications, you’ll get a 100 percent speedup,” he said. “In theory, you could turn off half the servers in your data center [after the upgrade and still have the same performance as was experienced prior to moving to version 7.0.0].”

Lower memory usage is key to this performance boost. “By shipping less memory around, things go a lot faster,” said Lerdorf, who serves as a distinguished engineer at e-commerce vendor Etsy. The upgrade features a multitude of optimizations as well, and its developers worked with Intel to make better use of hash lines and modern CPU features like registers.

Version 7 also includes abstract syntax tree, enabling developers to build tools for static analysis and other purposes. Another feature, scalar typing, boosts coding by “allow[ing] you to prove correctness of your code in advance,” said Lerdorf.

“If you have reasonably modern PHP code written in the last 10 years, you should have absolutely no backward-compatibility issues,” Lerdorf said. There may be issues with code written prior to that, with PHP builders deprecating some PHP 4 features, such as the ereg library for regular expressions.

Next up for PHP in a future version is a JIT compiler with an optimized engine, said Lerdorf. This could arrive in PHP 7.1 or 7.2, though it may take at least a year.

Lerdorf credits three developers with driving PHP 7 forward: Dmitry Stogov, from Zend; Xinchen Hui, from Lianjia Technologies; and Nikita Popov, a computer science/physics student in Berlin. Lerdorf said he is still involved, though, working on bug fixes and the like. He first developed PHP in 1995 and is surprised at its level of success. “I had absolutely no idea that other people would even use it at all. I built myself a hammer so that I could build dynamic websites quicker.”

At Rogue Wave Software, Andi Gutmans, who was CEO of PHP tools vendor Zend until its acquisition by Rogue Wave, lauded today’s release in a blog post. “PHP, the most popular Web development language, which runs by some estimates 80 percent of websites, is getting a big step-up in speed.”

The previous stable release of PHP was the 5.6 line. PHP developers had been developing a PHP 6 line that used Unicode in its internals, but that project wasn’t moving forward. The new line offered today skipped right to the PHP 7 designation to avoid confusion, Lerdorf explained.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author