New PHP RFCs and Code of Conduct

PHP 7 has only been out for weeks, and already we’re at version 7.0.2. Bug fixes, mainly, but that doesn’t stop the awesome machine that PHP internals has become from chugging along and planning new major features, too.

Among others, we’ve got several very interesting RFCs:

  1. Mcrypt viking funeral

    Short and to the point, this RFC proposes the immediate deprecation of the mcrypt extension. “But why?”, you may wonder. “Don’t major frameworks and libraries depend on it still?” - and yes, you’d be right. Turns out, everyone’s doing it wrong by still relying on it. The mcrypt extension needs to go, and a viable replacement is libsodium.

  2. Get libsodium into core

    Apropos libsodium, the same RFC author proposes it be added to the core of PHP. It’s a very secure library relied on by huge companies and with large backers, so it only makes sense. Security by default is a good idea, particularly in an ecosystem as damaged by outdated material as PHP’s is.

  3. PHP crypto

    With the above requirements firmly established, this RFC builds on them further by proposing the development of core crypto classes used for asymmetrical and symmetrical encryption, right in PHP’s core without the need to compile and install additional extensions. It would leverage support of openssl or libsodium, both of which are viable replacements for mcrypt. I personally think this is a fantastic idea, and I can think of many uses for these classes.

  4. Class friendship

    This RFC proposes the introduction of a new keyword: friend, to be used as use when using traits. Any “friended” class will then have access to protected and above (so not private) properties and methods of the class declaring the friend. Even skimming through the basic usage and the test example below it, I must admit I fail to see a possible use case for this that cannot already be solved without this apparent coupling-overhead. Perhaps someone can shed some light on the matter? Do it in this topic please!

  5. Code of Conduct

    Finally, and perhaps most controversially, Anthony Ferrara suggested the PHP project adopt a code of conduct - something of a trend that appeared in 2015 in several projects / programming languages. Much like any modern sensitive topic does, this RFC divided the community into those extremely against it and those extremely for it - there’s few who stand in the middle and just shrug. I’m on the “against” side, personally, but am willing to discuss it (and will do so in a personal blog post off of SitePoint) - this move has the potential to dramatically change the way contributions to the PHP core are made. What’s your stance on PHP adopting a CoC? Let us know?

Oh, have you filled out our reader satisfaction survey yet? We’re looking for input on where we can do better and how, and every reply is read and analyzed - please give us your thoughts here!

1 Like

I’ll be interested to read your blog on the PHP Project CoC, @swader.

As I said in a tweet about the CoC RFP,

How can anyone be against rules, which say, “we will be diligent in our actions to be normal and decent human beings”?

It might not be a necessity, most people are normal and decent, but it doesn’t hurt to declare it as clear rules either. It may even help weed out the minority, who usually successfully screw it up for the majority. You know, the bad apple 'n all.


I disagree for a variety of reasons, but here’s a good read on the topic by Paul Jones.


Well, I agree on your disagreement from the point that some people can blow anything out of proportion. So, I’ll fall back on a simple rule I also have. If there isn’t really a problem, then there isn’t really a need for rules to regulate possible problems nobody really has.

But, then again, Anthony surely had a reason for putting it up for discussion. Didn’t he leave the PHP internals group for a while?


Interesting turn of events.


1 Like

Good lord what dramaqueenery.

He did, but as a white male he definitely wasn’t in any kind of oppressed minority and did not leave due to anything related to what the CoC aims to solve. Same with Andrea Faulds. The problems in PHP are of a non-SJW kind.

I am not that “deep” into the scene, but what kind of problems would that be?


1 Like

A completely counterintuitive and dogmatic resistance to change by the “old school” gang. That is why it was so incredibly difficult to get some syntactic sugar into the language, why scalar type hints took so long and caused such controversy, and why this exists.


Ok. Yeah, I read that blog post some time ago. And I’d agree, a CoC doesn’t cover stubbornness to change.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.