PHP - Error and Exception Handling
You want to show all errors except deprecated warnings during development but hide all errors on the live site. Which code setup achieves this best?
if (ENV == 'dev') { error_reporting(E_ALL & ~E_DEPRECATED); ini_set('display_errors', 1); } else { error_reporting(0); ini_set('display_errors', 0); } correctly uses error_reporting with exclusion and display_errors on dev, off on live.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions