Sometimes, we want to show all errors and warnings with PHP.
In this article, we’ll look at how to show all errors and warnings with PHP.
How to show all errors and warnings with PHP?
To show all errors and warnings with PHP, we call error_reporting
in our script.
For instance, we write
error_reporting(E_ALL);
ini_set('display_errors', '1');
to call error_reporting
with E_ALL
to report all errors in our PHP script.
And we have
ini_set('display_errors', '1');
to show all errors.
Conclusion
To show all errors and warnings with PHP, we call error_reporting
in our script.