Set these on php.ini
:
;display_startup_errors = On
display_startup_errors=off
display_errors =on
html_errors= on
From your PHP page, use a suitable filter for error reporting.
error_reporting(E_ALL);
Filers can be made according to requirements.
E_ALL
E_ALL | E_STRICT