Generally, on all production web servers displaying error to end users via a web browser is turned off using php.ini file settings. XAMP is simplest and easy way to locate php error.
Step #1 – opens XAMP
Open Xampp control panel.

Step # 2 – clicking XAMP log button
PHP, has a solution to log all of your errors to a specific log file. Click Xampp log button to open error log file.

Step # 3 – Automatic opening Log error file
After clicking php error file would open automatically.
