问题描述
在编写代码错误时,可能会出现警告和通知.我知道错误背后的想法.我想有一个警告是为了通知您可能导致错误的事情,但通知不一样吗?我想通知不是做正确事情的消息;)
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.
推荐答案
通知是一条咨询消息,意思是你可能不应该做你正在做的事情,但无论如何我会让你做"
A notice is an advisory message meaning "You probably shouldn't be doing what you're doing, but I'll let you do it anyway"
警告是一条消息,表示您做错了一些事情,很可能在未来导致错误,所以请修复它."
A warning is a message saying "You are doing something wrong and it is very likely to cause errors in the future, so please fix it."
通知和警告都不会停止您的脚本的执行,尽管我鼓励您认真对待它们并努力在您的应用中没有任何通知.
Both notices and warnings will not halt execution of your script, although I would encourage you to take them seriously and strive to have not even one notice in your apps.
这篇关于通知和警告之间的 PHP 区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)