Becoming a PHP Core Contributor - The Journey Begins

Becoming a PHP Core Contributor - The Journey Begins

What does it take to be a PHP core contributor? What things do you have to do? Why would you do it? I’ve started on the journey. Here’s what I’m learning.


What does it take to be a PHP core contributor? What things do you have to do? And why would you do it? I recently started on the journey from PHP user and developer to core contributor, and I want to share my experiences with you, in case you’re keen to do the same, or if you’re just curious about what’s involved.

But Why be a PHP Core Contributor?

That’s a good question. Here’s my perspective. First of all I’m not a glory hound. So it’s not for ego gratification. Sure, I hear you say. But seriously, I’m not. One of my key aims is personal achievement. But it’s definitely not about ego gratification.

Let’s be honest, I think you’d have to have a pretty big ego to stay the course throughout the journey, if that’s your motivation. I’m human after all. But that’s not what’s really driving me here. What’s really motivating me to do this, is something else entirely.

## Here’s Where My Journey Began

Ever since I began working with PHP some 15 years ago, after a chance encounter with it, I’ve always had it in the back of my mind that, one day, I’d like to contribute to the PHP core. I saw it as a desirable goal for several reasons. These include:

  • Getting back to developing in C (I started out learning C, C++, and Java)
  • To broaden my language knowledge from PHP, JavaScript, bash and a smattering of others
  • To give back to the community
  • To really know more about what’s going on under the hood of PHP
  • To prove that I know my stuff

Perhaps the core motivation is the last one, to prove that I know my stuff, to prove that I am a “real” developer. For those who don’t know me personally, this might seem like a strange thing to say. And maybe I see it differently to how others do.

But I’ve always had a nagging self-doubt. I’ll be honest; I’ve not always done so well over the years as a developer. I’ve made my fair share of mistakes. And a lot of the time I’ve either taken it more personally than I should have, or have let people run me pretty harshly.

At one time this had become so bad, that I almost walked away from software development in pursuit of another career, any other career. That’s right - I almost walked away. Things just seemed to keep getting worse. And there seemed like there was nothing I could do about it.

Now I say seem. Perhaps it wasn’t. No, I’m not going to go in to intimate detail as to the specifics. But, at least in my mind at least, I felt, ever more strongly, that I wasn’t cut out to be a developer. It really seemed pointless to keep going. Why do so when things just seem to keep going wrong. The negative self talk was nearly all-encompassing.

But despite it all, I kept remembering that being a programmer, being a software developer, being a software craftsman was something I’d wanted to do my whole life. Despite the insecurities and the mountains of self-doubt, it was something I’d invested years of my life in.

It was something I’d sacrificed really hard for, improving myself when I could have been doing countless other things. It was something I just knew I wanted to do, to be. So I chose not to walk away.

In a way, you could say, I restarted my career at that juncture. Ever since then I’ve had a new, and better, question in my mind:

How can I prove that I know my stuff?

This became really important to me, because I wanted a benchmark, a gauge, something tangible with which to measure myself, to hold myself accountable, to keep myself motivated, and to negate the naysayers.

I wanted a definitive way to prove to the outside world, but perhaps more importantly to myself, that I am a “real” developer. Then along came a golden opportunity.

Why’s It So Golden?

Let’s think about it. To become a core developer, I’d suggest you need the following skills:

  • Personal organisation
  • Dedication & persistence
  • Clear thinking
  • The ability to communicate clearly, cohesively, and convincingly
  • The ability to negotiate
  • The willingness to be flexible and compromise
  • The ability to program in C (or the willingness to learn)

Note that only one of these skills is software development. I think that’s an important distinction. The other skills are more important. You might be gasping at this stage, gob smacked by the heresy I just spoke. But it’s true.

If you’re a wondering why it’s not more important, it’s because if you’re a more than average developer, you can learn another language, applying the skills you have to bring you across.

If you want to learn faster:

  • You can find a mentor to help you grow
  • There are numerous books you can read
  • There are numerous courses you can take
  • There’s an ever growing array of podcasts you can listen to

I believe, fervently, that the other skills are more important. Why? Because any project, of the size of PHP, isn’t built by any one person. It’s built by a group. Whether that’s a focused team, or a more loose assemblage, it’s built by a group.

To be a part of that group, you have to have personal and interpersonal skills. These are what the first six are. You can be an excellent developer; but as the saying goes, if no one wants to work with you, it’s going to be hard to be an active member.

Lucky for me, I like to think that I have most of the first six developed sufficiently. Sure, my personal organisation still needs some work. But I think I’ve shown a strong willingness and proficiency with them.

Developing in C however, on that point I’m a little rusty. It’s been a while since I wrote anything of sufficient size. So it’s going to take time to build those skills back up again.

Having said that, if I’m right, then over the course of this journey, I can be very self-assured that I’m a true professional as I come out the other side. So it was for these reasons, that I wanted to do this, should the opportunity present itself.

But What Triggered It Off?

Recently, whilst I was creating a patch for Zend\Db, I came across a situation where there wasn’t a function to do what I needed to do in core. Specifically, I wanted to know if the array which I was working with was scalar or associative. Given the plethora of other array functions, I’d have thought that it should have been there.

// is it this
[‘one’, ‘two’, ‘three’];

// or this
[
  ‘first’ => ‘one’,
  ‘second’ => ‘two’,
  ‘third’ => ‘three’
]

Here’s a simple example. What I wanted to know was whether the array I was working with was like the first one above, one which didn’t use any deliberate keys. Alas (perhaps that’s a bit dramatic), no such function exists.

What’s the problem, you might be asking. Just write it in userland PHP. Sure, that I can. The solution I took was this one:

private function isAssocativeArray($arr)
{
  return array_keys($arr) !== range(0, count($arr) - 1);
}

Talking to others, they proposed a host of similar solutions. Here’s a few of them:

function isArrNum($arr) {
  foreach($arr as $i =>$v){
    if (!is_int($i)) { return false; }
  } return true;
}

count(array_filter(array_keys($array), 'is_string')) > 0;

array_filter([...], 'is_int', ARRAY_FILTER_USE_KEY)

Arguably, from the pragmatic side, I could have worked with any of these. But something about it stood up and grabbed my attention. It just seemed like it should be there. Queue dramatic music. So I decided to press on and figure out how to validate the idea.

And So It Began

And that’s what lead me to start my journey down the road to becoming a PHP core contributor. Now naturally, as the journey’s just beginning, there’s more to the tale than I’ve covered here.

However, for one post, I think I’ve gone on enough. Next week, I’ll fill you in further as to the rest of what I’ve done, the feedback I’ve received, and the creation of the initial draft of the RFC.


You might also be interested in these tutorials too...

Thu, Nov 26, 2015

Reflections on Being Part of the PHP Community

Despite being developing with PHP since a chance encounter in 1999, I’ve only recently gotten myself involved in the community. So here’s a reflection on what’s changed since getting involved.

Mon, Nov 30, 2015

Abstract Factories for Rapid Development

Zend Expressive, like the Zend Skeleton project before it, is a great platform for building robust, maintainable, highly scalable applications. But it’s generally not the platform you’d think of for rapidly application development. However one little technique can change all that. Today, let’s learn that technique and begin changing your perception.

Thu, Oct 22, 2015

Why a Commitment to Continuous Deployment Pays Off

Recently, I was asked to build an application with a rapid turnaround time and modest budget. Being the sole developer, here’s the approach I took to make the development process as simple and efficient as possible


Want more tutorials like this?

If so, enter your email address in the field below and click subscribe.

You can unsubscribe at any time by clicking the link in the footer of the emails you'll receive. Here's my privacy policy, if you'd like to know more. I use Mailchimp to send emails. You can learn more about their privacy practices here.

Join the discussion

comments powered by Disqus