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 parse errors

Common parse errors - PHP Tutorial

From the course: Learning PHP

Start my 1-month free trial

Common parse errors

- [Instructor] When it comes to syntax errors, your code editor should do a lot of the work for you. Still, if you don't have real time error checking or there's a lot of code to manage, you might miss certain syntax errors. Here are some of the common ones you might come across. On line two here, you have a missing semi-colon. Pretty much every line needs to end in a semi-colon. Starting out or if you have a lot of code, this one is easy to miss. If we refresh, we'll see that there is an unexpected echo on line four, so you'll also notice that the error is not happening on line two, it's happening with the next line of code on line four. That's something to keep in mind. Usually when you see the word unexpected, you could be missing a semi-colon. Incomplete quotes is a another error that you might come across and this could cause two different types of errors that might cause some confusion. Here on line four, you'll…

Contents