enable error reporting in magento 2 code example
Example: magento 2 print php error
error_reporting(E_ALL); # Set Error Reporting as E_ALL (Report all PHP errors)
ini_set('display_errors', 1); # Un-commenting this line to enable PHP error display
error_reporting(E_ALL); # Set Error Reporting as E_ALL (Report all PHP errors)
ini_set('display_errors', 1); # Un-commenting this line to enable PHP error display