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.
Types of PHP errors
- [Instructor] There are several different types of errors in PHP, and they will behave differently based on their severity. Syntax or parse errors are generally typos or misused characters in your code. The compiler will stop your code from running completely, and there will be no output with a parse error. You can see we have one here on line four, where I forgot to escape a single quote. The way this page is structured is there's a heading for each error, and then a paragraph after each error, to demonstrate whether or not output continues. In this case, you can already see that my syntax highlighting is off and the line in question, line four has a red underline. If I save this page and open it up in the browser, you can see before the parse error, we have a heading, but when I refresh, all of that goes away and there's a single parse error, that says unexpected 'VE' and then it tells you what it was expecting on…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.