The PHP podcast where everyone chimes in.

Originally aired on

August 16th, 2016

051: What happened to PHP 6?

Despite the fact that there was never an official release of PHP 6, it was going to be a real thing with a lot of great improvements to the engine and language. But why was this version of PHP never released? We talk with some previous and current internals developers to hear the story of what happened to PHP 6.

with


What happened to PHP 6? Show Summary


What was the plan for PHP 6?

  • PHP 6 was supposed to add native unicode support to PHP.
  • This represented a big change and many features were blocked from being added to the PHP 5.x codebase because unicode support had to be added first.
  • Significant progress was made towards implementing unicode support, but the process dragged on for a long time:
  • Eventually many of the new features intended for PHP 6 were backported to the PHP 5.x branch.
  • PHP 6 had a wider focus than just character encoding (There is an episode of PHP roundtable on the subject of Character Encoding and UTF-8) - it was also about changing the approach to i18n and l10n.

What is the legacy of PHP 6's collapse?

  • Strings literals in PHP are still fundamentally composed of bytes.
  • It is up to developers to deal with character encoding issues using mbstring, iconv, uconverter, etc.
  • The intl extension wraps a lot of the functionality that was originally going to be a part of PHP 6 for use in PHP 5.x/7.x.
  • In PHP 5, working with UTF-8 could be painful. Sometimes we would have to specify UTF-8 characters using hex notation.
  • PHP 7 helps by adding the inline UTF-8 literal syntax \u{[0-9A-Fa-f]+} and IntlChar class.

What went wrong?

  • The decision to use UTF-16 internally was made early on in the process (2005).
  • At the start of work on PHP 6, UTF-8 was not widely supported but during development, the industry started to standardize on this. Widespread adoption of this more forgiving encoding helped with a lot of the problems that PHP 6 was trying to solve and made the objectives less relevant.
  • The number of contributors who fully understood the problem was relatively small and the amount of tedious conversion work was large.
  • In open source, people work on what they are interested in and not enough people were interested in it.
  • Full unicode support using UTF-16 negatively impacted performance.
  • By 2009/2010, it had started to become apparent that PHP 6 was never going to happen.

What can we learn from PHP 6?

  • PHP 6 was not a failure: it spawned the intl extension and other features that are now part of the language in 5.x or 7.

Other links

Sammy Kaye wraps up with

Sara Golemon

  • Sara is @SaraMG on Twitter
  • She works on getting XP in video games and torturing PHP
  • Works on the XHP extension for PHP - XHTML embedded in PHP

Derick Rethans


Sean Coates


Andrei Zmievski

  • Andrei is @a on Twitter (not a typo)
  • Works as a Principal Engineer at AppDynamics in San Francisco
  • Enjoys traveling, photography and craft beer in his spare time

Developer Shout-Out

The Developer Shout-Out recognizes developers in the community for their contributions.

For this episode the panel guests, Sara, Derick, Sean, and Andrei nominated Simon Welsh for the Developer Shout-Out segment.

Thank you, Simon Welsh for your contributions to HHVM and other OSS projects. A $50 Amazon gift card is on its way to you.

$50 Amazon gift card sponsored by Laracasts

Laracasts

It's like Netflix for developers.

Show Notes Credit

Chris Shaw

Thank you Chris Shaw for authoring the show notes for this episode!

If you'd like to contribute show notes and totally get credit for it, check out the show-notes repo!