With PHP 5.2, PHP allows you two methods of logging PHP events using the error_log directive in php.ini. A typical set up would be to configure PHP to log to a flat file, by setting the error_log value to the full path and file name to your php log file.
Simply open your php.ini file with your text editor and replace;
log_errors = Off
With;
log_errors = On
This will turn on PHP logging in PHP. Next step is to direct PHP to log events to your Windows Event Log by finding this;
;error_log = syslog
And replacing it with;
error_log = syslog
Although syslog is actually the *nix equivalent of the Windows Event Log we still need to specify it here as PHP does not differentiate between the two, however PHP will know to log to the Windows Event Log when being used on a Windows System. With that done save your php.ini file and recycle the IIS application pools using PHP, and you should now start seeing PHP events being logged to your Windows Application Log in Event Viewer.