Skip to content
Why PHP Skipped Version 6: The Unicode UTF-16 Disaster That Led to PHP 7

Why PHP Skipped Version 6: The Unicode UTF-16 Disaster That Led to PHP 7

PHP 6 was planned as a Unicode-enabled version using UTF-16 internally, but performance penalties, conversion overhead, and extension incompatibilities stalled development for years; after a 2010 schism, the project was abandoned, its features backported to PHP 5.3/5.4, and a 2014 internals vote (58-24) named the next major release PHP 7, which delivered performance gains via phpng instead of native Unicode support.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub

Problem PHP 6 Aimed to Solve

In PHP, strings are byte sequences; the engine does not know or care about character encoding. For ASCII this works because one character equals one byte. Once outside ASCII, problems arise: in UTF-8, é uses two bytes, so strlen('café') returns 5. Functions like substr() and strtoupper() operate on bytes, not characters, causing corruption when truncating UTF-8 strings. Developers relied on the mbstring extension and its mb_* functions, but the language itself had no concept of a character.

Despite PHP's huge success in recent years, as the sole remaining member of the scripting language "P triumvirate" (the other two being Perl and Python), it remains oblivious to the multilingual and internationalized environment around it.

Andrei Zmievski wrote this in his August 2005 design document.

Planned Approach

Andrei started the Unicode overhaul at Yahoo in February 2005 with contributors from Yahoo, Zend, and PHP core. Initially targeted for 5.x, the scope grew to require a major version. On 10 August 2005 he posted the design document to Internals outlining:

Adopt ICU : Use International Components for Unicode for Unicode support.

Internal UTF-16 : Store Unicode strings internally as UTF-16 because ICU uses UTF-16 internally.

Configuration switch : A unicode_semantics INI setting to enable Unicode mode site-wide.

Two string types : Text defaults to Unicode string; raw byte streams get a dedicated binary type. Binary literals prefixed with b (e.g., b"...").

Although less memory-efficient for basic ASCII text, it simplifies processing logic and interacts more smoothly with ICU, because ICU's own internal processing also uses UTF-16.

The first Unicode-support commits landed in php-src on 11 August 2005. Rasmus Lerdorf immediately opened a wishlist thread for 6.0, noting that Unicode mode would break backward compatibility, so other breaking changes could be included.

Paris Meeting

In November 2005 core developers (Rasmus, Andrei, Derick Rethans, Zeev Suraski, Dmitry Stogov, Marcus Börger, Wez Furlong, Jani Taskinen) met in Paris. Derick published the minutes. Decisions included:

Unicode mode controlled by php.ini switch, default on.

Extensions not updated for Unicode would not load in Unicode mode.

Remove register_globals, magic_quotes, safe_mode.

Bundle APC opcode cache by default.

Introduce namespaces, late static binding via static::, and 64-bit integers.

Current micro-benchmarks show certain Unicode string function implementations are up to 300% slower, and overall applications slow down by up to 25%.

Difficult Progress

Development continued on the php-src trunk (now PHP 6). In 2006 Andrei renamed the switch to unicode.semantics; in 2007 Dmitry merged namespaces into the PHP 6 branch. PHP 5.2.1 (February 2007) added forward-compatibility support for the b prefix and (binary) cast — placeholders that behaved like normal strings in PHP 5 but prepared code for PHP 6.

Developers began questioning the switch's purpose if code had to run in both modes. On 19 May 2008 Andrei removed the switch entirely, making Unicode mode the default. PHP 6 became a pure Unicode language.

PHP 5.3 Absorbs Features Early

While PHP 6 dragged on, other planned features were ready. In September 2007 Ilia Alshanetsky proposed a PHP 5.3 feature list starting with backporting the namespaces patch. Internals voted to backport namespaces, late static binding, and __callStatic from PHP 6 to PHP 5. PHP 5.3.0 released 30 June 2009 with namespaces, late static binding, closures, goto, short ternary ?:, and the intl extension (ICU wrapper for locale-aware formatting). Andrei's slide summed it up: PHP 6 = PHP 5 + Unicode .

Premature Books

Publishers released PHP 6 books before any release: PHP 6 and MySQL 5 for Dynamic Web Sites (Peachpit, Dec 2008), PHP 6 and MySQL 6 Bible (Wiley, 2009), Professional PHP6 (Wrox, 2009), Beginning PHP 6, Apache, MySQL 6 Web Development (Wrox, 2009). MySQL 6 also never shipped. The 2014 RFC noted PHP 6 was taught as a done deal with detailed specs from php.net developers, not just book authors. Rasmus countered in 2010: "Those writing books or articles who made people think they knew the final shape of PHP 6 were misled. We never finalized the feature set, let alone a release date."

Why It Stalled

The core problem was the UTF-16 choice. The outside world uses UTF-8 (filesystems, databases, HTTP). Every interaction required conversion. Pierre Joye (2010): "The meager gains from using UTF-16 were almost entirely offset by the high conversion overhead." Stas Malyshev identified performance and compatibility as the two mountains: extensions like mysql and pcre had poor UTF-16 compatibility; bloated memory hurt scalability; existing apps crashed in weird ways, e.g., md5() calls gained an extra recoding step, invalidating all passwords.

Manpower shortage : Rewriting every extension for the new string type was tedious and endless. PHP 5.3 release manager Johannes Schlüter wrote that contributors avoided trunk, preferring stable 5.2/5.3 branches or simply stopped contributing. In his 2011 talk "The Good, the Bad, and the Ugly: What Happened to Unicode and PHP 6" Andrei admitted: "Maybe fewer than 10 people truly understood the intricate details of Unicode and ICU," and "everyone was fed up with rewriting large amounts of previously working code." He added: "If I did it again, I'd probably choose UTF-8."

March 11, 2010: The Break

The end began with a dispute over output buffering. Jani Taskinen merged a large output buffering change into stable PHP 5.3. When criticized, he replied: "Cut the crap, this is a bug fix. Let's just call the next version 5.4, should've done that anyway." Derick replied: "No, put that in 6!" Hours later Jani created a PHP 5.4 branch with commit message: "Hello PHP 5.4, open doors to all new features."

Rasmus emailed Internals: "Jani blew up again today... The real decision isn't whether to do a 5.4, but how to solve Unicode. Current progress has obviously stalled." He proposed moving PHP 6 code to a branch, returning daily development to trunk, and seeking a lighter Unicode approach (like mbstring and ext/intl). He refused dual maintenance: "I flat out refuse to go down the 'maintain 5.4 branch and separate Unicode branch' road again."

Jani, frustrated with decision-making, suggested renaming the PHP 6 branch to THIS_IS_LOST_CAUSE. On 16 March Derick renamed the 5.4 branch to THE_5_4_THAT_ISNT_5_4 and moved trunk to FIRST_UNICODE_IMPLEMENTATION. These branches remain in the php-src GitHub repo under experimental/first_unicode_implementation and experimental/the_5_4_that_isnt_5_4. Andrei's 2011 slides labeled Jani's branch creation as "TIME OF DEATH"; he said: "Several person-years of hard work gone, too discouraging," and "I never had the energy to push that boulder back up the hill."

Years Without a 6

PHP continued: PHP 5.4 (March 2012) brought traits, short array syntax [], built-in web server, and finally removed register_globals, magic_quotes, safe_mode (all planned for PHP 6). PHP 5.5 (2013) and 5.6 (2014) followed. The php.net history page notes: "This development work was later abandoned, but other features planned for PHP 6 were instead merged into PHP 5.3 (namespaces) and PHP 5.4 (traits, short array syntax)."

No one agreed on the next major version name. In 2012 Anthony Ferrara discussed a future 6.0, noting stagnation. By 2013 php-src trunk was labeled 5.7, not 6. In early 2014 "PHP 6" resurfaced as a new major version without the Unicode rewrite. Rasmus described a better Unicode attempt: a lightweight, fast library using UTF-8 internally to avoid per-operation conversion.

Not everyone wanted the old name. April 2014 Eli White urged dropping it: "The next PHP version should not be named PHP 6 because: 1. It confuses less adaptable users; 2. Calling it something else costs us nothing and has no downside." He suggested "PHP 2014" or "PHP Leaping Leopard". Zeev replied "+1 for PHP 7.0". Nikita Popov opposed: "Calling it PHP 7, skipping a version number, will cause confusion (a big question mark moment)."

phpng

The real catalyst for a new major version was performance . On 5 May 2014 Dmitry Stogov announced phpng, a four-month closed-door Zend Engine refactor with Xinchen Hui and Nikita. He described it as: "We changed the foundation while keeping the building above ground as intact as possible." Early tests showed 10-30% real-world gains; later RFC claimed 20-110% on WordPress and Drupal. On August 2014 Internals voted 47-2 to adopt phpng as the base for the next major version.

The Naming Vote

July 2014 Andrea Faulds opened RFC "Name of Next Release of PHP" — initially a yes/no on "PHP 6". Zeev demanded a true choice between 6 and 7 and co-authored the case for 7:

First and foremost, PHP 6 existed and was a completely different thing. The decimal system (we have infinite numbers) lets us easily skip a version, with plenty left for the future.

Arguments for 7 cited negative aura: "PHP 6 was a failure; Perl 6 was a failure; MySQL 6 never shipped." Risk: "Taking risk for zero reward is not a good strategy." Bonus: "7 is considered lucky in both Western and Chinese cultures."

Arguments for 6 stressed consistency : "By our current release process and semantic versioning, the next major after PHP 5 should be PHP 6." Books promising phantom features would fade. Joke: "If PHP needs a unique name, call it PHP 2016 per precedent, not just skip a number."

Voting had turbulence: Zeev paused and rewrote the pro-7 argument; Andrea cancelled the vote citing imbalance; Derick protested; Nikita accused Zeev of deleting pro-6 points. Vote restarted 23 July. Andi Gutmans (Zend co-founder) on Perl 6 comparison: "It seems obvious to me that calling it PHP 6 does a disservice to developers."

29 July 2014 Andrea announced result: 58 for 7, 24 for 6 . Voters for 6: Andrea, Nikita, Phil Sturgeon, Levi Morrison, Pierre Joye. Voters for 7: Zeev, Andi, Dmitry, Xinchen Hui, Derick, Stas, Sebastian Bergmann, Fabien Potencier. Rasmus abstained. Andrea concluded: "Hopefully the dispute ends here and we can focus on implementation and features instead of endless naming arguments. :)" Phil Sturgeon summarized: "One side has a truckload of arguments; the other has only one logic: 5 + 1 = 6."

15 August 2014 Dmitry bumped php-src version to 7.0.0-dev. A PHP 5.7 RFC was later rejected, making 5.6 the final 5.x.

PHP 7.0 Arrives

3 December 2015 PHP 7.0.0 released. Announcement: "PHP 7 is up to twice as fast as PHP 5.6." Features: scalar type declarations, return type declarations, null coalesce operator ??, spaceship operator <=>, anonymous classes; removed deprecated ereg and original mysql extensions. Zeev called it "first major PHP update in over a decade." Rasmus told InfoWorld: "In the vast majority of real-world applications you get a 100% speedup."

PHP 7 did not bring native Unicode strings. To this day strings are byte sequences; developers still need mbstring or intl for precise character handling.

PHP 6 Remnants

b prefix and (binary) cast : Still exist. Prefix yields normal string; (binary) is alias of (string). Deprecation RFC failed in 2017 (19-13, short of 2/3). (binary) cast deprecated in PHP 8.5 (with other non-standard casts).

Revisiting b prefix : 25 September 2026 Juliette Reinders Folmer proposed deprecating it, noting it and the cast were introduced in PHP 5.2.1 for PHP 6 forward compatibility. Now on PHP 8.7 deprecation list.

intl extension : Brought ICU support to PHP 5.3; remains core tool for locale-sensitive formatting, collation. Andrei listed it as a success.

Isolated branches : The original Unicode implementation branch still sits in php-src as experimental.

February 2018 Nikita removed the last unicode.semantics check from php-src.

PHP 6 is a unique historical artifact: a fully planned, coded, published, taught version that never shipped. Yet the effort wasn't wasted: most planned features arrived in PHP 5.3 and 5.4; the one feature that failed — native Unicode via UTF-16 — became the reason the version number was erased from history.

Historical Timeline

February 2005 : Andrei Zmievski starts Unicode project at Yahoo.

10 August 2005 : Andrei posts PHP Unicode design document to Internals.

11 August 2005 : First Unicode support commits merged into php-src.

11 November 2005 : Core developers meet in Paris, plan PHP 6.

8 February 2007 : PHP 5.2.1 adds b prefix and (binary) cast for PHP 6 forward compatibility.

September 2007 : Internals votes to backport namespaces etc. from PHP 6 to PHP 5.3.

19 May 2008 : Andrei removes Unicode switch; PHP 6 becomes Unicode-only.

30 June 2009 : PHP 5.3.0 released with namespaces, closures, late static binding.

11 March 2010 : Jani Taskinen forces PHP 5.4 branch; Rasmus proposes shelving Unicode rewrite.

16 March 2010 : Derick moves PHP 6 to FIRST_UNICODE_IMPLEMENTATION branch.

22 April 2011 : Andrei presents talk "What Happened to Unicode and PHP 6".

1 March 2012 : PHP 5.4.0 released with traits and short array syntax.

5 May 2014 : Dmitry Stogov announces phpng.

29 July 2014 : Internals votes 58:24 to name next version PHP 7.

15 August 2014 : php-src version bumped to 7.0.0-dev.

3 December 2015 : PHP 7.0.0 released.

February 2017 : RFC to deprecate b prefix and (binary) cast fails.

3 February 2018 : Final unicode.semantics check removed from php-src.

25 September 2026 : Juliette Reinders Folmer proposes formal deprecation of b prefix.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PHPUnicodeUTF-16version historyinternalsPHP 7PHP 6phpng
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.