How To Enable Displaying PHP Errors
Enable Error in PHP
In production, display_errors is usually set to off. However, in development, it should be set to on, so that errors get displayed and easily handle by the developer.
error_reporting(E_ALL); ini_set('display_errors', '1');
Note: If you need to disable error pass 0 (zero) to the ini_set() like below -