From the course: Learning PHP

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Common debugging tools in PHP

Common debugging tools in PHP - PHP Tutorial

From the course: Learning PHP

Start my 1-month free trial

Common debugging tools in PHP

- [Instructor] Finding errors in code, especially when you're just starting out, isn't always the easiest thing to do. From syntax to runtime errors, you might spend some time troubleshooting, so it's good to look at what you'll come across. But before diving into common errors, here are a few tools that will help you quickly find and prevent bugs in your code. The first is your own code editor or IDE. Modern tools will have syntax highlighting, auto-completion, and will point out syntax errors in your code. So you could see on the screen here that VS Code highlights variables in blue and constant or literals in this teal green. So let's say I want to put some extra parentheses around a conditional. If I say a is less than two, I want to do something. Notice that the code editor added extra parentheses here. But if I forget the parentheses, echo "Hello", and then I save it, we'll have a red underline here, and VS Code…

Contents