Submitting a bug

If you are convinced you have found a problem with PHP, it is quite possible you are correct and you should notify the developers. Note that many hundreds of "bogus bugs" have been reported in the past, which are usually the result of people not reading the manual correctly. If you think you have found a problem, follow these steps before you submit a bug:

  1. Go to and download the latest PHP snapshot for your machine. Take a backup of your existing installation, then install the snapshot - this essentially gives you the bleeding-edge version of PHP. If your problem still exists, go to step 2.

  2. Go to IRC and ask people there to reproduce the problem. It is possible that the problem lies in your PHP configuration, DBMS, operating system, or any other of a dozen potential culprits. If the problem is reproduced by others on IRC, then go to step 3.

  3. At this point you have almost certainly got a bug. However, before you send it off to the developers, you need to try to reproduce your problem using the shortest possible chunk of code. While it is possible that you are 3000-line masterpiece does show up a bug in PHP, it is also very hard for other developers to verify the problem. Take out every line that does not stop the bug from appearing - the shorter your script, the faster others can pick it up and reproduce the problem.

  4. You should now clearly be able to see what sequence of events causes the bug to show itself. You now need to make sure the bug has not been reported before, so go to and search for it.

  5. If there is no record of a bug like yours existing, you can file a bug report from the same URL. Try to be as descriptive as possible, as your bug report will be mailed off to everyone on the PHP Internals mailing list for analysis.

  6. Once your bug has been submitted, you will be notified as to its progress. All being well it will be fixed immediately, but you may find that the developers need to ask you a few questions before they can get to work.

  7. Finally, developers will fix your bug and a new version of PHP will be available on for you to download and try out. If the bug has been fixed, write back and say it is all working fine so that the bug can be signed off. The most common problem when fixing a bug is "no feedback" - a possible fix has been applied but the original finder hasn't gotten back to say "it is fixed". Do not let this be you!


Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Contacting the author >>

Previous chapter: User groups

Jump to:


Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.