You can write below lines of code in your custom PHP script to show PHP errors in Magento.
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); To debug in magento, set following line to enable display errors in index.php: ini_set('display_startup_errors', 1); OR
Add following line to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE “true”
To show PHP parse errors, use the following
display_errors = on // modify this in your php.ini file