PHP Interview With Chris Cornutt The Hero Behind – Don’t Ever Stop Learning

About This Interview

This is the #13th set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHPeople who are already highly involved into the PHP Ocean and *being there* taming the waves and surfing better than ever to make themselves an Awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community.

On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders. I hope you will derive as much fun to read my interviews as I’m having by interviewing those awesome PHP people.

A Small Intro..

In this edition I talked with Chris Cornutt, the Hero Behind If you are a PHP fan and you haven’t heard about @phpdeveloper and @enygma, it’s just like you are a manga fan without having ever heard of Goldorak (Grendizer in english) and Actarus (Duke Fleed in english)! If this is the case, you should start asking questions about the depth of your “PHP fan-ism“.

Apart from being a passionate PHP Community knight, Chris has an outstanding dedication for his endeavour over at You will get to know about how ‘mana-intensive’ the ‘upkeep’ of this type of “Goldorak” is, as you read through the interview. At the time of this writing, as per, he is ranked as the 13th (out of 2,585) most influential person on Twitter for #PHP. Cornutt is also the co-writer of the PHP handbook, PHP String Handling, has spoken at so many conferences and has also written some nice articles; the one for PHP Advent (@phpadvent) entitled “You Need the PHP Community” is a must-read.

And Now The Interview…

>> Please tell us a bit about yourself

Well, let’s see – I’m a developer that’s been doing web-related things for over ten years now. It’s been almost all PHP with splashes of Javascript and front-end development thrown in for fun (really, how can you develop for the web without knowing a little frontend stuff). I’m currently working here in Dallas, Texas for a security group and am a fan of testing, deployment and developing solid, well-crafted software.

I’ve been involved in the PHP community in a major way for several years now via the sites I’ve worked on ( and mostly) and the talks I’ve given at various conferences (php|tek, ZendCon and – coming soon – the Dutch PHP Conference @dpcon) as well as the articles I’ve written for some of the PHP-centric publications out there. I’m also a co-organizer of not only the Dallas PHP User Group (@dallasphp), but also the Lone Star PHP Conference (@lonestarphp in its second year).

>> How you started with PHP

I actually sort of stumbled into PHP – I was a Perl guy to start off with and still have my O’Reilly books sitting on my shelf. When I went off to college, a whole new world of web development opened up to me and, thanks to a good friend of mine (hi Cory!) I came to know about PHP. I knew right off that I wanted to move into web development so I dove head-first into PHP and haven’t looked back since.

That’s been about 12 years ago now and the web has changed so much in that time – it’s hard to keep up with some of the new advancements, but I’m glad that PHP has remained the powerful, flexible language that it has.

>> How do you find PHP now as compared to when you first started

I started with PHP back in the PHP3 days (a.k.a the “Wild West” of the language) and was immediately taken with it. When I started to learn the language, I was happy to find that most of the things I needed to do were already in the language. This was a time back before sessions and a lot of the things we take for granted with PHP 5.x+ so there was a lot of the infamous “PHP hacks” going around. Most of the code I wrote was procedural and objects and classes were a foreign concept.

Flash forward to today and I know that, despite all of my experience with the language, there’s still untapped potential just hiding out there, waiting to be discovered. There’s techniques that other languages have used for a while now that are just making their way into the PHP ecosystem and others (like MVC) that are already standards in PHP development. The language has matured a lot and has (recently) gotten a lot more superpowers than it had before – I’m excited to see where it heads next.

>> Based on your experience, what are the good and bad parts of PHP

One of the bad things the plagues me every day – and I know loads of PHP developers have said the same thing – is the ordering of the parameters in lots of the functions. I can’t tell you the number of people that tell me “yeah, I have to keep the manual open in another tab all day just to be sure I’m getting the right order.” It’s a side effect of the organic growth that the language has had, and thankfully things are getting better about it, but it’s still a constant annoyance.

As far as good things, I think some of the recent features that have been added to the language have been awesome – closures, namespaces, LSB, traits and the built-in web server (invaluable for testing). The language is maturing nicely and I love reading all the articles showing how to use these new things effectively.

>> What would be the Top advice to a PHP beginner

If you’re just starting out in the language, one thing to remember – don’t ever stop learning. Don’t be afraid to try out new things in your code, it’s the only way you’ll advance as a PHP developer. If you just cut and paste from tutorials to get the job done, you’re not learning anything. Take a class that you’re using and try to re-factor it to make it perform better or even be easier to read. Not all of the advancements have to be in the code either. You can go find a project on github that doesn’t have any tests and take advantage of the opportunity to learn a little unit testing too!

>> To someone who wants to become a better PHP developer, what is your advice?

I’d say the advice is the same as my answer to the “beginner” question. Once you hit a point where you think you have a good grasp on the parts of the language you use, go exploring. I can’t tell you the number of times (even today!) that I’ve been working on something and someone has said “you know PHP has a function for that, right?” There’s lots of little goodies tucked away in the PHP manual and language. Don’t be afraid to try something out and see how well it fits.

>> The best PHP book you’ve read

Wow, I haven’t read a PHP-specific book in a long time. Most of my reading is on either blogs and news sites. Of the recent releases, though, I’d have to recommend the “Writing Cutting Edge Code” that Lorna Mitchell, Davey Shafik and Matthew Turland co-authored ({@lornajane, @dshafik, @elazar}). It’s packed with lots of good content and I’m glad that they’ve brought it all together into one place that’s easy for PHP developers to pick up and use as a go-to guide.

>> A PHP blog or resource you highly recommend

Am I allowed to say 🙂 No, seriously – there’s lots of great resources out there that publish some great PHP content. Just a few on my list include (@phpmasterdotcom), the aggregation site (@planetphp), Smashing Magazine (@smashingmag) and the NetTuts site.

>> The IDE that you use

I switch between editors/IDEs right now – I’m a big fan of Sublime Text 2 (@sublimehq) for its lightweight approach and for the simplicity of dropping in packages with support for lots of the common things I do daily. There’s been some great packages for it created by people like Stuart Herbert and Rob Allen. ({@stuherbert, @akrabat})

On the IDE side, I’m a fan of PHPStorm – it’s a great IDE that, despite being Java-based, doesn’t seem to have a lot of the problems that things like Eclipse and Netbeans have. I like it for the code completion and the integration of things like unit testing and version control, but it still gets a bit on the heavy side sometimes.

>> How do you debug your PHP code?

Image by Simon Howden

I’m an “old school” debugger – I’ll integrate things like XDebug or FirePHP into my process on occasion, but more often than lot I usually just end up using a logging class (or even *gasp* print_r or var_dump) to get the job done. I like being able to see the raw data that I’m working with and sometimes just tailing a log file is the simplest way.

>> A PHP framework you use and would recommend

I’ve used a lot of the PHP frameworks out there for a lot of different projects – some personal and others for my work. I’m a fan of the right tool for the right job so I can’t say I really have a favourite right now. I’ve been doing more work with the Zend Framework (v1) and FuelPHP lately, so I could recommend those, but for very different reasons.

>> A CMS that you think is worthwhile

We have some of the MODX guys local (here in Dallas) and they recently gave a presentation at a Dallas PHP user group meeting and I was quite impressed. Not only does the product interface look nice (more important than you’d think in a good CMS) but it also has a lot of power to it. If I had some spare time, I wouldn’t mind getting more into the source of it and seeing how it works (it’s open source you know! {, @modxcms})

>> A unit test framework you recommend using?

Hands down it’d be PHPUnit. There’s some interesting new contenders out there (like Enhance@EnhancePHP) but PHPUnit tests are the de-facto standard. I’ve come to realize the real power of unit tests only within the last few years and the results have been excellent. There’s so much to be said for the comforting feeling that good tests, all passing, can give you about your code-base.

>> Your LAMP stack comprises.. ?

As I’m a Mac user, I’m more of a “MAMP” stack sort of guy. I don’t really use the MAMP packages that are out there though. I started way back in college doing both programming and sysadmin work and they’ve both sort of stuck with me over time. I’m a big fan of compiling things to get them “just right” and have no fear of setting up servers and software on unix-based systems. I’m not a pro at sysadmin stuff, but thankfully I have some good people to turn to who are in my times of need.

>> One PHP person that you admire and what strikes you about him/her

Cal Evans The PHP Icon — (Photograph by Rob Allen)

There’s so many to choose from that do amazing things in the community every day, but I think one of the most impressive ones to me is Cal Evans (@calevans). Not only has he worked tirelessly at companies like Zend and php|architect to ensure that the PHP conferences they’ve put on are the highest quality, he also really cares about the people in the community. He’s gone out of his way to connect people, sometimes to help them find new jobs and others just because he “thought they needed to meet”. I know he’s helped me out a lot in the past with conference-related things and when I was looking around for a new position myself.

He’s also produces the “Voices of the ElePHPant” pod-cast that, like these interviews, does a great job of bringing the PHP community to everyone and sharing more about those “big names” you see at conferences and around the web on a more human level.

>> One function that you like (or which you tend to use frequently)

As I mentioned in the “debugging” answer above, I tend to use the print_r/var_dump functions a lot to figure out what’s going on in my code. It wasn’t until relatively recently that I knew about the second parameter to print_r, though, that lets you return the result as a string – perfect for a file-based logger (or a database table, really). I think between the two of these, I use them just about every day.

>> One PHP Community that you recommend

Of course, I’d first recommend the PHP community as a whole – there’s a whole world of PHP developers out there that are specialists in each of their own fields. That being said, I also recommend the Dallas PHP community. There’s an ever-growing group here in Dallas that meet to learn new things, swap horror stories and just generally enjoy being around each other. It’s great, especially for those “lone gunmen” out there that are the only ones doing PHP at their company, to come together and have like-minded folks who understand where they’re coming from.

>> The best conference you attended would be..

Well, i’m a little biased in saying the Lone Star PHP Conference last year – I’m one of the organizers and I was ecstatic when things went pretty smoothly for a first year conference. It might not have been the best out there as far as sessions and attendance (even though we sold out!) but I felt a sense of pride when it was all said and done.

As far as a conference I didn’t help plan, php|tek (@phptek) is right at the top of my list. They never fail to have a great lineup of speakers and topics and they have running a conference just about down to an art and always have good evening activities planned.

>> Can you please share the good, and may be not so good moments, of being part of all the conferences you attended

There’s been lots of good moments at the conferences I’ve attended. I think some of the best, though, have been when I’ve given presentations. No, I’m not claiming that they’ve been amazing and life-changing or anything, but I’ve really enjoyed the satisfaction of being a teacher to people that are there in the room and wanting to hear about my topic. I’ve always loved teaching and being able to present at a conference is a perfect opportunity to do that on a wider scale.

Not so good moments….hmm…I think the only thing that comes to mind as far as a not-good kind of thing was something that happened at ZendCon a few years ago. There was a session that was about deployment and continuous integration that wasn’t marked as a promotional talk of any kind. It was just billed like any other session. When we went, though, it turned out to be less about deployment in general and more about how to do it with their product. It was disappointing to say the least. Thankfully the group that put it on rectified it by publicly apologising and putting on a more general session later in the unconference.

>> What are the main aspects of conferences that can really help a PHP guy to get better in his progression

The only advice that I’d give as someone who has attended his share of conferences is not to be a flower on the wall. I know it can be intimidating to have the groups of folks that already know each other hanging out in their groups, but jump in and start up a conversation (or just join in on one that sounds interesting). That’s one of the major points of conferences – being there, physically with people that are interested in the same topics and are there to hang out with the same.

Don’t look across the room and say things like “oh, that’s The Ben Ramsey..” – go over, introduce yourself! Get to know people! If you don’t, you might as well have stayed home and hopped on IRC. ({@ramsey})

>> If you could change one thing with PHP, that would be…?

One thing? Hmm…the only thing I can think of isn’t really to do with the language itself, more with the community around it. For all of the good practices that are talked about in PHP, there’s still a lot of bad code out there. Unfortunately, I think with PHP’s low barrier for entry, there’ll always be things like this. I wish there was a way to have a guide or something that developer could (and would) use to get started in their development “the right way”.

>> Which was the worst programming mistake you did?

The worst mistake by far happened in my first job out of school – I was working on a large PHP4 project and needed to do a replacement on a string across lots of files. Now, keep in mind that this place I was working didn’t really use version control as a standard. I found a snippet on the web somewhere of a shell command that would let me do it recursively and dropped that into my terminal. It worked like magic and I figured everything was good.

Unfortunately I also found out why you don’t do a global replace on a string without thinking of it’s impact. Not only did it replace the string in all of the text of the files, but it also replaced it in variable names too….no version control, no backups. Needless to say I had a long day/night ahead of me to fix that one.

Chris And

>> You are the man behind which has become the defacto when it comes to “The recommended PHP Resource”

Photo by Dan

i) if I’m not wrong, was the first project you started – could you tell us the story behind, how you came with this idea and how was the journey (the challenges and things you learned..etc)

You’re correct – was the first “real” PHP project I took on. I started it in the very early days of my life in PHP (back in college). Originally it was just a place for me to keep links to cool PHP resource I found. I think some of the first were things like and, of course, the PHP manual. I’m not exactly sure when I decided to make a blog out of it…or if they were even being called “blogs” back then. I started out just posting about random PHP things that I’d seen and cool projects that came up on Freshmeat.

It wasn’t always the daily stream that it is now, though. If I look back at some of the first postings, they were pretty sporadic. It slowly evolved into something more, though. I’m not sure there was a certain point when I decided to make it a daily thing, it just feels like it’s always been that way. I have a natural curiosity and a hunger for knowledge, though, and being able to read these posts/articles (yes, I read most of them) lets me feed that and keep in tune with everything PHP.

It’s not without its challenges, though – there’s been times that I’ve gone on trips and been places that haven’t had Internet access. It took me a while to realise that a simple solution to this is timing out the posts. I actually write most of my posts first thing in the morning (I’m an early riser) and have them space out during the day, trying to get in at least 6 or 7 per day. I write them all up by hand, include some quotes from the article where needed and add some personal commentary when it feels right.

I could go on and on about all of this, but for the sake of the readers, I’ll stop there 🙂

ii) is surely very time and energy consuming, it’s not easy to moderate all that content and filtering for quality and be on the lookout for new potential good ones. How do you manage to still be so faithful and dedicated to it.

Photo by worradmu

I spend maybe an hour or so each day writing up the posts for the site (first thing in the morning, usually) and my feed reader is my best friend. I have loads of feeds in there from people all across the community and am adding to them all the time. Some posts are easy to rule out – the “Top Ten” lists or the personal ones from people (like a “I’m speaking at…” post) are easy to drop since the content doesn’t really appeal to the wider audience. The harder ones to call are the ones about specific technologies – what it basically boils down to is “is this interesting?” I know, it’s completely subjective, but posting these things daily, I get a good feel for what the community finds interesting and what I can share that they’d like.

They say when you do something often enough, it becomes a habit. Well, I’d say that running this site for 10+ years might just qualify as “long enough”. It’s part of my routine now – I grab my coffee as soon as I’m up and fire up Google Reader to find out what the latest is. I wade through the posts and pick out the ones I find interesting and write up my posts about them. In fact, my day feels “off” if I don’t get my posts written!

iii) How do you search for new potentially good contents and what is the frequency of this effort?

My list in my reader has grown so much over time – usually what happens is either someone specially tells me about a new resource or I stumble across it via links on other sites (like @PHPCamp or @DZone) and see that it has more great content than just the one article I’m posting. I grab the URL and drop it into my reader and watch the content come rolling in.

I also get a lot of good submissions directly from the community – either directly to me or through the submission form on the site. Obviously, I don’t post about all of them, but there’s some real gold to be found in some of those posts.

iv) Would like to share how many blogs/sites you currently aggregate on

Right now I have 461 blogs and various sites in my reader and that’s not counting any submissions from visitors to the site or links I happen to come across. I also have lots of PHPers I follow on Twitter and if one of them posts an interesting link, a lot of times I’ll pick that up too (similar for IRC – I’m usually on Freenode as “enygma” if anyone wants to say hi).

v) The average number of queued/pending contents you get daily?

As I mentioned, I usually try to post about 6 or 7 each day. Of course this all depends on how much content is out there to post. Sometimes there’s just not much new stuff to be found when I sit down in the morning. There’s days that it trickles in and I end up posting them through out the day. Usually, though, there’s an average of 40-50 unread posts in my reader each day.

vi) If you have to quote a time when you felt that is now The Famous baby it is today, that would be…

Image by digitalart

This is a weird question for me to answer – I don’t do the site to be famous or anything like that. I love reading about all of this stuff and I like sharing it with others. It combines my desire to share/teach others about things with writing (which I also enjoy). It’s still really strange to me to have people either recommend it as a resource or to be like “oh, you’re the guy that runs that site!” I even had someone tell me that it helped them get a job the other day!

vii) is built upon, is this correct? How has your experience of working with that framework been as compared to other frameworks like ZF or Symfony for instance

Yes, the current version is built on the (now older) Solar framework. I say “current” because the site has gone through many different incarnations over the years. I’ve used the site as an opportunity to experiment with different frameworks and it’s been powered by things like Solar, the Zend Framework and (work in progress) FuelPHP. The current code’s not very pretty, but it’s been working for a while now and hasn’t caused too much trouble. The newer version I’m (slowly) working on is a bit more stable and has some other features to help me make the site an even more useful resource.

Chris And

>> You are also a developer for, is the co-organizer of the Dallas PHP user-group and also the (organizer?) of

NOTE: Chris was was the original developer on, but then Lorna Mitchell – who is the lead on that project now – took over the lead as Cornutt says: “I was the original developer on it, then Lorna (@lornajane) came in and thankfully was able to take over those duties during a busy time in my life”.

i) Can you briefly tell a bit about each of them

The project started a few years ago as a resource for conference goers to provide direct feedback about the sessions they attended to the speakers that gave them. The idea came from a (now infamous) discussion with Matt Turland and Keith Casey (@CaseySoftware) about the paper forms they hand out and how the speakers have to wait so long to see the results. So, I figured why not give them a way to provide instant feedback and give the speakers a channel to give their own responses in real time. It’s taken off and lots of the PHP conferences – and others outside the PHP community – use it as their sole feedback mechanism. I’ve even heard about speakers including the link to their profiles in session submissions for other conferences so the organizers can see their past ratings!

The Dallas PHP user group and the Lone Star PHP Conference are kind of intertwined. I’ve been an organizer of the Dallas PHP group for a few years now with the help of two other local guys, Jake Smith (@jakefolio) and Daniel Cousineau (@dcousineau). The three of us work to track down speakers and provide some useful discussion in our meetings each month. The three of us are also the organisers of the Lone Star PHP Conference, now in its second year. We’ve broadened the event this year and are brining in speakers from all over the world including a few from Canada and from the UK. It’s going to be an awesome event this year and we have some great sponsors to thank for it!

>> The good moments and may be the not so good moments you’ve experienced with those projects

I can’t say there’s been any overly bad moments with any of these things – they haven’t gone perfectly and there’s been growing pains along the way, but there’s nothing that stands out as bad.

Closing Out With Chris

>> How do you time manage all the stuffs that you do, coupled with your personal life?

I’m busy 🙂 No, seriously – I’m a believer in the “you make time for what’s important” philosophy. My family understands my time spent on each day, so that makes it easier (it’s usually before the kids are up anyway!) and the other projects and things I’m involved in are worked on when I find the time. I love spending time with my family in the evenings and, if I do any hacking at night, it’s always later on after the kids are in bed.

>> Why you are successful and why others are not?

Image by Stuart Miles

I’m not sure what the definition of “successful” is in this case, but I can tell you why is still around today (as I hope it will be years from now too) – dedication. I decided a good while back that if I was going to provide this resource for other developers out there, it wasn’t going to do it halfway. I’ve seen other news-ish sites come and go over time and I know how hard it is to find the time to post to it. That’s why I make a concentrated effort to get up and write my posts at about the same time every day and keep the habit going.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.