In the world of programming, programs rarely works correctly at the first time. Some or many things inside your program may go wrong
that cause the PHP interpreter to generate an error message.
To make error message display in the browser, then set the display_errors configuration directive to On. And to send the errors to the
web server error log, then set log_errors to On.
There are the following points which need to be verified while debugging your program:
- Misspelled Variable Names - If you misspelled a variable then PHP understands this as a new variable
- Missing Semicolons - Every PHP statement ends with a semicolon (;)
- Not Enough Equal Signs - When you ask whether two values are equal in a comparison statement, you need two equal
- Array Index - All the arrays should start from 0 instead of 1
- Missing Dollar Signs - A missing dollar sign in a variable name is really hard to see, but at least it usually
results in an error message so that you know where to look for the problem
- Troubling Quotes - You can have too many, too few, or the wrong kind of quotes
- Missing Parentheses and Curly Brackets - They should always be in pairs
PHP Online Test
Latest 5 Posts by CodesCracker