, 67 tweets, 188 min read Read on Twitter
Let’s make a #thread about what @zeevs posted and proposed a few hours ago in the #PHP #internals.
There was a little confusion about what was proposed, despite his words being quite clear. This is going to be VERY long, for I have no idea how to sum up things. ¯\_(ツ)_/¯
🔽🔽🔽
@zeevs First, let’s rewind the timelines a little, and have a look at history. I hate the past and history, but as pure facts, it sometimes is needed.
@zeevs PHP emerged in its raw, primitive form, circa 1994. It’s now 25 years old. The first idea was to get rid of CGI backends, crashing segfaults, maintenance nightmare, not suited for a web world. All that in the form of scripts, parsed through a slower but safer interpreter.
@zeevs Rasmus Ledorf (@rasmus), 50 years old from Denmark (Greenland) initiated the project, first for himself. But many people from newsgroups (the genetic sibling of mailing lists, the ancestor of forums, which are the ancestors of social networks #ExplainItToMillenals) came to help.
@zeevs @rasmus Andi Gutmans (@andigutmans) and Zeev Suraski (@zeevs), both now in their mid 40, from Israel, were among those people. Boy, time flies. #TempusFugit
They founded the bases of what we know today.
@zeevs @rasmus @andigutmans Andi and Zeev, together, founded @zend Technologies, in Cupertino, USA, and recently left it. Their careers are now somewhere else. Both are also emeritus members of Apache Software Foundation (@TheASF).
@zeevs @rasmus @andigutmans @zend @TheASF Andi Gutmans is now working for Amazon (head of a fistful of AWS).
Zeev Suraski left Zend a few weeks ago. He said “he’s still in tech”. No more for now. :)
Now Zend is part of Rogue Wave Software (@RogueWaveInc).
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc Rasmus Lerdorf is still involved, and all of them 3 are still board members of the PHP Group, who “owns” property and strategy for the language (php.net/credits.php). But, as he said himself: he creates solutions and then handles them to “better people”.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc A quick history can be found in my slides, mostly inspired by Rasmus’ ones, here: slideshare.net/WilliamPinaud/…
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc (and my corresponding conference, given in an @afup / @AFUP_Limoges meeting, in French, is here: )
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges Please give a warm high five to those three people. There wouldn’t be any PHP discussion without them. They did an amazing job over those 25 years.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges Now, this partially explains the origins of everything now. If you look at the #PHP RFCs (wiki.php.net/rfc), you’ll notice a trend. As for every project, there are four types of proposed contributions. That somehow reflect the Cynefin / Stacey Matrix.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges In short, there are:
🔵 Bugs (bugs.php.net)
🔵 Legacy management and unused stuff dropping
🔵 Evolutive facets that follow the new world
🔵 Abstract proposals made to test new, fuzzy stuff
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges If you want examples, think of, respectively:
🔵 A bug in parse_url()
🔵 Deprecating __autoload() magic function in PHP 7.2.0
🔵 Implementing the foreign functions interface (FFI)
🔵 Moving from an AOT compiler to a JIT compiler.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges Now, the problem is that PHP still holds the primitive, unharmonized implementations of its first contributors, back then when no one had any idea they needed THAT much organization, voting and stuff. Remember, this is 10 years before Git was born, and 13 before @github was.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github For instance, if you look at the perpetual comments regarding language consistency, you always face the same trolls, and people who come out from other languages often get lost on that.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github For example, looking at naming consistencies: as Rasmus says so himself (here: ): there are no real naming inconsistencies, they’re just not the way you expect them to be. :)
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github The deal with PHP one has to understand, is that it’s quite old, and NEVER was pumped by major companies will. Contrary to Javascript (which is nowadays essentially @google, despite the W3C background), Java (@oracle), C# (@apple) or TypeScript (@microsoft).
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft So, like Python, Ruby, or Rust, PHP has a struggle in finding core maintainers (github.com/php/php-src). That requires above the average skills in C, security, algorithmics, among other things. Right now, PHP is lacking some of them.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Also this lack of programmers to maintain the core was responsible for one of the major crashes into its development. Between 2008 and 2011, there was one of the major initiatives ever tried to make PHP a more than ever unique language.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft People wanted to go in further, and offer universal source code character recognition, new engines, and much more new stuff. They would call it PHP 6. Due to the complexity of the project and the lack of motivation of many people, PHP stopped evolving for a few years.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Much of the work was ported to PHP 5.3.0 >> 5.6.0. But no real, structural, fundamental innovation was made to the engine. During that time, many major companies invested a no way back amount of money (billions) on PHP projects.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft One of those companies was of the GAFAM, who all own one or more properties on languages and technologies. This is strategic defense. In the case of open licenses becoming private, they needed independence.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Facebook did not have this independence, despite becoming too large to allow not having such independence. So they invested of faster web techs, like Google does.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft They built the foundations of what is now partially distributed as React for the frontend, and Hip-Hop Virtual Machine (HHVM) for the backend (these are NOT what Facebook actually uses, but close to it).
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft They also added meta-languages for both sides. JSX (reactjs.org/docs/introduci…) and Hack (hacklang.org) languages were born.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft By doing so, they completed their independence roadmap, and compensated for a time the difference between the entrepreneurial pace and the open-source pace. This avoided a potential crisis for them. Cool. But not.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft (They also rewrote databases, like Google did for BigTable, and created Hive to complete the ecosystem.)
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft The problem here is that this outpaced the original, open-source based project that PHP was. And a strategic move had to be done. I mean, leaving PHP to Facebook could be a thing, but the GAFAM show no mercy when it comes to taking arbitrary moves.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Also one must understand that there’s a difference in providing a programming ecosystem that people use to fuel your business (like Java for Android apps) and doing so simply because you use it… Until you don’t need it anymore.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Mostly, the reason why Facebook needed updates is that while it was becoming the second most used domain behind google.com, the need for performance was becoming more and more immediate.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft We’re talking about tens of thousands of servers. Think of their cost and ecological imprint (the latter is more than probably ignored by GAFAM, with the exception of their communications services). But they do go along, fortunately for the planet.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft By this time, PHP had Zend Engine (the core PHP interpreter since the dawn of men) version 1.0 from 1998, version 2.0 from 2005n but the core engine desperately need a rework. PHP community then woke up and eventually came up with a new engine, labeled php-ng.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft As of PHP 7.2.0, php-ng strictly outraces HHVM. And we’re back to having an open source project, despite the many discussions regarding the PHP License, which is partially protected and therefore seen as many as “not totally open source”. Whatever.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft (if you are interested in reading about the incompatibility with GNU, have a look here: gnu.org/licenses/licen…)
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft And that is not the sole strategic move for PHP. Many (like, many) of the current PRs / RFCs deal with “adding cool stuff”.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft Cause PHP is one of the most evolving languages as of today (php.net/ChangeLog-7.php), along with Javascript (ecma-international.org/publications/s…), or Python, for instance (docs.python.org/3/whatsnew/cha…). This is part why those languages are among the top popular languages.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft There are two corporate strategies behind those moves. And both of these mix essential development of a programming language project on one side, and battle planning among the global computing ecosystems on the other side:
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft 1. Changing legacy incoherences makes less trolls and attracts dumb CTOs / IT C-levels (you know, the ones who read stuff like this - google.com/search?q=whyph…).
2. Adding functionalities that embrace new paradigms, which is mandatory. Change or die.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft If you don’t understand point 1, take a dive into the strong typing, arrays syntax (braces and array() function, mostly), case-insensitive constants and function arguments order debates, you’ll get to the point quite fast (wiki.php.net/rfc).
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform With the arrival of FFI, pre-loading, JIT compilation with lazy-loading and hot code detection, OpCache core integration, PHP is answering the polarization of modern web apps, having rich frontends segregated from backend calculation and functional/structural constraints.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform This is also why there could be a new PHP engine coming pretty soon as well. The ability for PHP to evolve, regardless of extreme C-level contracts, makes it very deemed to go every direction. This, my friends, is where the internals have set the course to.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform So now, we’re back to the main topic, now you have the necessary background to fully understand the idea Zeev raised there, and why they are critical and incredibly clever, which is: how to arbitrate the polarizing discussions and RFC between:
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform - How to move away from legacy incoherences without breaking the planet (PHP fuels 80% of websites worldwide - w3techs.com/technologies/o…)?
- How to implement new, radical changes at the same time so as to make strategic, enterprise-friendly moves (i.e., to enroll CTOs worldwide)?
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform First, if you haven’t done so, you need to read what Zeev wrote:
- In the RFC wiki: wiki.php.net/pplusplus/faq
- In the internals list: externals.io/message/106453
- (alternately, on Mailing lists ARChives: marc.info/?l=php-interna…)
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform In short, Zeev proposes to create a new “alternative version” of PHP (call it a “dialect” if you want), based on the same engine, source code and interpreter basics, bundled with PHP but offering an alternative way of reading scripts, getting rid of BC breaks. Both would cohabit.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform The main thing, here, is the first quote from Zeev, that is one of the introduction sentences on the internals “FAQ” post, made to sum up things (the link is just above):
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform “There are two big, substantial schools of thought in the PHP world. The first likes PHP roughly the way it is - dynamic, with strong BC bias and emphasis on simplicity; The other, prefers a stricter language, with reduced baggage and more advanced/complex features.”
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform As @zeevs states, people concerned about any of those moves are less concerned about the other ones (but not ignoring them, though). To illustrate this, one of the most breaking stuff right now is the strong typing concerns.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform This implies lowering performance in order to allow the interpreter to check memory implementation structures and interpretation. This is by essence mandatory in low-level languages like C, and is actually done in C by the Zend Engine.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform If you want to read more regarding structural memory storage of PHP variables, have a look at @julienPauli ‘s amazing article on his blog: blog.jpauli.tech/2016-04-08-has…
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Also, please remember: in PHP, as it could be anywhere else, strong typing is NOT a synonym of “progress”. This is a fallacy for people who started with low-level languages.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli The ultimate aim of programming is not, and will never be to stick to the machine, but to get closer to human thought process. Most people tend to forget this. Going towards binary electronic impulsions is NOT “cleaner”, “more logical”, nor is it “safer”.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli PHP is a higher-level abstraction language. There’s a reason why you don’t see a segfault every day while using Symfony or Laravel. Dynamic typing is NOT a bug: it’s a fully willingly implemented feature from day one, for instance.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli As Zeev states, this wouldn’t be a fork. For it would divide, without conquering. As stated above: PHP does not really lack core developers at the moment (<3 to them all, by the way!). Both “standards” or “core API sets” would be embedded in any install.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli In short: same engine, same code base, different modules, constraints. One would have, let’s imagine, short tags, the other would not. One would have rewritten, strict code, syntax and signatures. The other one would keep legacy stuff that is still at risk if deleted/changed.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Looking at real-world examples, right now, there aren’t many strictly similar moves, but you can think of:
- Kotlin/Clojure/Groovy/Scala for Java,
- C#/Rust/C++/Cilk/Objective-C for C
- Dart/ESX/TypeScript/CoffeeScript/ES6 for Javascript
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli The worst part of this is that a new “P++” language, whatever it would be called, should expose perfectly ALL new API, deprecations, and BC breaks in ONE shot. This would be hell of a challenge.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli We all know why we’re talking about BC breaks here: legacy code worldwide. It can’t happen twice. Or people will move to something else. Python is an excellent alternate candidate for PHP developers, and thanks to machine learning, it is growing very fast.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli The idea behind that systemic distribution of both sets would be to avoid the failure of Hack language, which was not promoted by PHP itself, and was solely developed by an individual company. Which open source developers don’t really like.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Also, remember that the same team would have a grasp on both directions, implementations and choice. There wouldn’t be two teams, two companies, two divergent strategic needs. That changes everything.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Last but not the least, the legacy implementation of the “low-level” set would subsequently never be abandoned, for it would benefit from all common, core upgrades, like the latest engine upgrades. And older systems would still see a progress in upgrading low-level tech layers.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Like @zeevs wrote, the hardest challenge now will be to find a decent, commercial name for this. 😜
And please, remember: this is JUST a FAQ, just a draft of thoughts. This is an open discussion that top-level people are having, not a C-level “do it or you’re fired” instruction.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli That’s it. I hope I didn’t rewrite history, nor deface the thoughts and wills of people mentioned above. If so, please do correct me. This is a catch-up on history and internal discussions, not everything might be accurate.
@zeevs @rasmus @andigutmans @zend @TheASF @RogueWaveInc @afup @AFUP_Limoges @github @Google @Oracle @Apple @Microsoft @php_swoole @symfony @ApiPlatform @julienPauli Please forgive me if it is so. 😇
You have a great day. Peace.

(poke me if you need French translation of all this crap!)
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to William ∞ DocFX
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!