PHP offers a solution to log all errors to a log file.
Just add the following line to your php.ini file to log errors to a specified file, in this example /home/username/phperror.log (replace username in the file path with your cpanel username):
error_log = /home/username/phperror.log
For more information on working with your php.ini file, please see our article: How do I Update my Local PHP Settings?
You will also need to write your php script to generate and update that log file. More information on sending PHP errors to the log can be found here:
If you're looking for a general error log for your site(s), you can find that within cPanel. On the cPanel Home Screen click on the Error Log Icon to bring up the error log for the account: