PHP 7.1: a tighter type system and the small wins around it

PHP 7.1 shipped December 1st. No 2x performance headline, no engine rewrite. It fills in the gaps that 7.0 left in the type system, and those gaps were genuinely annoying. Nullable types 7.0 let you declare string $name as a parameter type. What it didn’t let you do was say “this can also be null”. You had to drop the type hint entirely or hack around it. 7.1 adds ? prefix: ...

January 15, 2017 · 4 min · Guillaume Delré

PHP 7.0: performance, types, and the features that stuck

PHP 7.0 dropped on December 3rd. A month and a half in, I’ve migrated two projects and the results are hard to ignore. The headline number is 2x faster than PHP 5.6. That’s not a benchmark cherry-pick — it’s the median across real applications. The Zend Engine was rewritten to use a new internal value representation that cuts memory usage significantly and reduces allocations. On one project, average response time dropped by 40% with zero code changes. You just upgrade and it goes faster. ...

January 17, 2016 · 6 min · Guillaume Delré