0
0
PHPprogramming~5 mins

PHP error types and levels - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Parse Error in PHP?
A Parse Error happens when PHP finds a syntax mistake in your code, like a missing semicolon or bracket. It stops the script from running.
Click to reveal answer
beginner
What does a Fatal Error mean in PHP?
A Fatal Error occurs when PHP encounters a serious problem, like calling a function that doesn't exist. It stops the script immediately.
Click to reveal answer
beginner
Explain a Warning in PHP.
A Warning is a non-fatal error. PHP shows a message but continues running the script. For example, including a missing file triggers a warning.
Click to reveal answer
beginner
What is a Notice in PHP?
A Notice is a minor message about something that might be a problem, like using an undefined variable. It doesn't stop the script.
Click to reveal answer
intermediate
Name some common PHP error levels.
Common PHP error levels include: E_ERROR (fatal errors), E_WARNING (warnings), E_PARSE (parse errors), E_NOTICE (notices), and E_DEPRECATED (deprecated features).
Click to reveal answer
Which PHP error stops the script immediately due to a serious problem?
AWarning
BFatal Error
CNotice
DParse Error
What type of PHP error is caused by a syntax mistake?
ADeprecated
BWarning
CNotice
DParse Error
Which PHP error level shows a message but allows the script to continue?
AFatal Error
BParse Error
CWarning
DError Exception
What does a PHP Notice usually indicate?
AA minor issue like an undefined variable
BA deprecated feature
CA syntax error
DA serious error stopping the script
Which error level warns about features that will be removed in the future?
AE_DEPRECATED
BE_NOTICE
CE_WARNING
DE_PARSE
Describe the main PHP error types and how they affect script execution.
Think about which errors stop the script and which allow it to continue.
You got /5 concepts.
    List and explain at least three PHP error levels and give an example of when each might occur.
    Consider errors that stop the script, warnings, and minor notices.
    You got /4 concepts.