Alex Rivera | Logout

PHP difference between notice and warning

Asked 2011-01-07T10:17:11.930
51

When writing code errors, warnings and notices can occur. I know the idea behind errors. I suppose a warning is there to inform you about something that can cause an error, but isn't a notice exaclty the same? I suppose a notice is not a message of something doing right ;).

It's just a bit confusing to me. Can anybody tell the difference between those two and the way these messages should be treated.

Edit
Report

1 Answer

8
  • NOTICE: this is a short message for saying what to do or what not to do.
  • WARNING: occcurs at run time. Code execution continues.
  • ERROR: this also occurs at run time, execution terminates.
answered 2013-07-02T20:12:23.213

Your Answer