In normal development, many developers I have contacted rarely use exception-throwing statements in their methods. For a strict developer, this is intolerable.
So, how to better use exceptions in PHP? Many developers may be confused about errors and exceptions. Today, I will introduce the difference between errors and exceptions, and how we should use them flexibly.
Reference documentation:
https://segmentfault.com/a/1190000009504337
http://bbs.csdn.net/topics/392035881
http://blog.csdn.net/wjc19911118/article/details/46859339
http://www.jb51.net/article/97143.htm
https://www.cnblogs.com/zyf-zhaoyafei/p/6928149.html