Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. // SYNTAX ERROR:
  2. //  when there is mistake or a typo with the way you write your code
  3. //  for example. below is an example of a syntax error or maybe you miss
  4. //  a semi-colon.
  5. if( $a == 2 {
  6.     echo cool";
  7. }
  8.  
  9. // RUNTIME ERROR:
  10. //  this happens when your script breaks right before execution
  11.  
  12. // LOGICAL ERROR:
  13. //  happens when the logic to code execution is wrong, for example you want
  14. //  your script to add 2 numbers but instead it subtracts 2 numbers, this is
  15. //  usually the hardest to detect
  16.  
  17. // COMPILE ERRROR:
  18. //  happens when there is a problem interpreting the code
  19.  
  20. // FATAL ERROR:
  21. //  happens when your code breaks or terminates script execution
  22.  
  23. // USER GENERATED:
  24. //  happens when you personally trigger an error using trigger_error function
  25.  
  26. // PARSE ERROR:
  27. //  i forgot to mention this one but it is the same type of error as syntax error
  28.  
  29. // whenever anyone of these errors occur PHP usually displays some kind of message like
  30. // E_ERROR and more, a list of below is a list
  31.  
  32. // E_ERROR: A fatal error that causes script termination
  33. // E_WARNING: Run-time warning that does not cause script termination
  34. // E_PARSE: Compile time parse error.
  35. // E_NOTICE: Run time notice caused due to error in code
  36. // E_CORE_ERROR: Fatal errors that occur during PHP’s initial startup (installation)
  37. // E_CORE_WARNING: Warnings that occur during PHP’s initial startup
  38. // E_COMPILE_ERROR: Fatal compile-time errors indication problem with script.
  39. // E_USER_ERROR: User-generated error message.
  40. // E_USER_WARNING: User-generated warning message.
  41. // E_USER_NOTICE: User-generated notice message.
  42. // E_STRICT: Run-time notices.
  43. // E_RECOVERABLE_ERROR: Catchable fatal error indicating a dangerous error
  44. // E_ALL: Catches all errors and warnings
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement