PHP Interview With Derick Rethans The Father Of The PHP Swiss-Army Knife aka Xdebug – Get Familiar With PHP Security!

About This Interview

This is the #26th 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..

Derick Rethans – Father of Xdebug

In this edition I talked with Derick Rethans the Father Of The PHP developer’s Swiss-Army Knife aka Xdebug. Derick is an expert when it comes to the PHP Internals; no wonder he is viewed as a vibrant and “man of action” within The PHP Community. As a PHP Core Contributor, he has been at the crux of many PHP extensions and variations; the mcrypt, date and input-filter extensions, bug fixes, additions and even leading the QA team.

Besides speaking at so many conferences, @derickr is also the author of the book php|architect’s Guide to Date and Time Programming and has also co-authored PHP 5 Power Programming.

And Now The Interview…

>> Please tell us a bit about yourself

I’m Derick and I blog at I am the author of Xdebug and have been using PHP for over a decade. I’ve written a few books (one on PHP’s Date/Time support) and I’m now working on the MongoDB PHP driver for 10gen Ltd. I also like mapping and maps and OpenStreetMap.

>> How you started with PHP

This must have been somewhere in 1998. At that time, I started a business with two of my class mates from university and we started doing web development. We picked PHP mostly because it seems simple and it worked on Linux. If I remember correctly it was simply something that the sysadmin had installed for me to play with.

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

I think the scripts from back then would still work, but, of course PHP has come along a lot. And it had to, as the web matured a lot in the last 14 years.

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

I’ve always liked the easy of use. PHP is something that can be very easily picked up, which makes it a great tool to get the things done. On the other hand, it also makes it quite easy to make a big mess. So being easy to use is both a good and a bad point!

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

Read a lot, ask questions, and get familiar with security. It might not matter so much in the beginning, but do not blindly just copy and paste code around without knowing what it does. If you don’t know, go read about it on the Internet and ask questions!

>> The IDE that you use

I use VIM; I love it. It’s not an IDE but it such a flexible tool. I do everything in it. Coding, writing emails and writing documentation– it all happens in VIM.

>> A PHP framework you use and would recommend

I don’t really use one, but I would recommend to write your own. It’s going to be a great experience and you will learn a lot about architecture and MVCs and everything complicated. Then throw it away, and evaluate some of the existing big ones with a big community. If those don’t work for your specific case, write something very thin again yourself. However, that means that you can’t rely on the community of the other frameworks to help you out!

>> A unit test framework you recommend using?

I’ve only really used one, and I think there is only one viable tool for PHP: PHP Unit. However, don’t get too hang up about unit testing only. It’s great thing to do, but there are other important things to learn first!

>> Your LAMP stack comprises.. ?

Linux, lighttpd/nginx, MongoDB and PHP.

>> One PHP person that you admire

Just one? That’s hard. There are so many great people in the PHP community and they’re all doing great work.

>> One PHP Community that you recommend

I hang out a lot on IRC, just because I am geeky and I like it. I used to hang out a lot and help people with their PHP challenges. Mostly on #php on EFNet, but then later ##php on Freenode/OPN. It is a *great* place to learn, as long as you are a bit patient and do your homework first before asking questions!

>> The never ending debates on PHP would be.. ?

Is echo really faster than print?

>> How did your journey with Xdebug start?

It started out as a very simple thing to make sure PHP wouldn’t crash when you were doing infinite recursion, then came the stack traces and all the other functionality. I mainly wrote it for myself at the start, and it has saved me a lot of time; however, writing Xdebug costs me a lot of time as well. It’s a really important tool though for so many developers and I definitely don’t mind spending so much time on it.

>> What IDE you think works best in combination with Xdebug to produce a nice debugging environment?

I’ve always liked Komodo for debugging, but lately netbeans and PHP Storm have made great improvements. I am however a command line type of guy, and would really prefer having a stand alone debugging client without the requirement of an IDE!

>> Is there any existing close alternative to Xdebug?

Not really. Some functionality is available in other extensions, but no other tool has everything under one hood: debugging, stack traces, profiling, etc.

>> Besides Xdebug, what is the next debugging extension/tool you use or recommend to use..

For profiling, I suggest you would also look at xhprof. Its profiler is a bit better than Xdebug, and it’s always good to test performance issues with as many distinct tools as possible!

>> As a PHP internals expert, how would you define those “PHP internals” to someone new to PHP?

“Stay away”. It’s not important if you’re just starting out with PHP. Come back in a few years when you know PHP inside out.

>> To someone who wants to develop PHP extensions correctly, what is your advice?

Starting to write extensions is not a simple task. You need to be really sure that you want to do it. To start of, have a look at Embedding and Extending PHP by [Sara Golemon @SaraMG]. It’s not very new but provides you with a really good set of base information. From then on, have a look at some of the smaller and simpler extensions in the PECL repository. There are literally 100s of examples out there.

>> When should someone really think about creating a PHP extension?

There are a few reasons where I think it makes sense to write an extension. First of all of course is to wrap a library for which no PHP extension exists yet. This can be a computational library should as GMP, or this could be a new database driver.

The second reason is to replace existing functionality already written in PHP with an extension. This is what the twig extension does. It re-implements one of Twigs slowest function as found through benchmarking. Don’t just simply reimplement the whole PHP library in an extension though!

>> What is the pros and cons (if any) of developing extensions?

The code runs a lot faster than a PHP implementation, but the maintenance time for the code will sky-rocket.

>> Things that you’ve learned from being part of the PHP Community

That it has been by far my best investment in my career. Networking, learning from people and interaction with developers spread all over the globe are such an important skills that you will never be thought in any school.

>> Things that you’ve learned and experienced by being part of the Core PHP Contributors

There are a lots of awesome and clever people, but there are also a few distruptive persons. Over the past 12 years I’ve learned to pick my battles better as there are only so many you can fight.

>> As a core developer, are you satisfied with the way PHP is growing? What would you do different?

I think lately too much tape has been put up. Sure, it’s good to formalize a few processes but I think the current “RFC for everything” is not something that belongs well with an Open Source project such as PHP.

>> I get the impression that Core contributors do not like to be so much visible, at least they seemed to be less accessible; few of them even have a blog to talk about what they do as opposed to you – you have your blog, talks at conferences..etc.
Is my impression wrong, if not why do you think it is this way?

I think it has nothing do with being a core contributor or not. There are always going to be people that don’t want to have any “customer” facing view. That’s true for core contributors, but also for basically any employee of any company. There is always a certain group of people that goes out to visit user groups, gives talks and writes articles. Others just want a 9-5 job and that’s it. They are losing out though.

>> The day you realised “You’ve made it to the A-List PHP arena” ?

Hmm, that is a tricky question. I don’t find it important to be on an “A-List”. I just like scratching itches and if other people can benefit from the (Open Source) work that I do, great. I certainly don’t care.

>> A final word before closing up..

From my perspective, going to speak at conference, writing (and publishing) Open Source software and writing – both books and articles on my website – are probably some of the best things I’ve done in my career. Without that, I would most definitely not be where I am right now.

Additional Contents / Interviews Elsewhere

1) I would like to quote a nice question from another interview of Rethans conveyed by Jacob Friedman over at

As you know, Rethans is also The PHP Evangelist at 10gen and here is a question related to that:

>> What does it mean to be a PHP evangelist?

At 10gen, being a PHP evangelist means that you talk to user groups about Mongodb as it relates to a specific language. But I’m not just an evangelist–I’m also working on the driver itself.

I’ve been using PHP for a while–13 or 14 years. I’ve worked for various companies and for myself, and I’ve been at 10gen since November. So it’s taken a while to get here.

2) Cal Evans at also did a pod-casts interview with Derick Rethans – recommended listening!

Now Do Your Part!

1) Help diffuse this interview to the PHP ecosystem – Share, tweet and spread the word to your audience ==> That would be a FREE way to thank me 😉

2) Make a comment below using the comment form – I’m sure you can at least say 1 word about this interview

3) LIKE 7PHP dot COM on FaceBook – if you appreciate what I do

{I’m thankful to your response(s)!}

1 Comment(s)

  1. Hi, of course there is alternative to XDebug – NuSphere’s debugger has been around much longer than xdebug – is faster and easier to set up than xdebug. includes profiler of course.

    Be objective, when publishing articles..

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.