Writing PHP is more than just memorising hundreds of functions and hanging out in #php on IRC - there is a lot to learn about writing style, debugging practices, distribution and cross-platform concerns, documentation, and also testing of your code.
There is a huge variety of ways you can debug your code in PHP, and, when mastered, you should be spending only a little of your time hunting for elusive bugs.
If you do get stuck, you are certainly not alone - there is a good selection of help resources on the Internet, and you should be able to get most problems solved in just a few hours.