I know that you can use @ to suppress errors. But anyway, can you do php ignore @?
In my case, I have to use the 3rd side of the script, which uses @, the script is huge, and it's hard for me to find where it dies.
When you use the PHP Xdebug extension, you can ignore error management of the @ operator using this configuration parameter :
@
xdebug.scream = 1
This disables the @ (shut-up) statement so that notifications, warnings, and errors are no longer hidden.
There is a scream extension to turn off silence.
Each custom error handler receives suppressed error messages:
set_error_handler("var_dump");
Just an example. Usually you choose a more convenient reporting function.
But still you can do php ignore @?
I donβt think so, no, not without an extension, as @deceze showed.
However, you can configure a custom error handler . If you configure this to ignore the error_reporting() parameter, which is 0 when inside the function that was called with @ , you can output an error there.
error_reporting()
0
you can use
print_r(error_get_last());
to get the last generated error after the script so you can catch suppressed errors.
Further reading error_get_last ()
ini_set('scream.enabled', true);
You need to install the vi extension:
http://www.php.net/manual/en/book.scream.php
Source: https://habr.com/ru/post/1342266/More articles:windows phone 7 pictures transition applications, how to make your own? - c #Sending voice over the network and receiving it using HTML5 and mobile applications - streamHUE Images - objective-cMatplotlib removes the white border (padding) when .set_aspect = 'equal' - pythonJavaScript, RegExp - replace with expression with expression expressions with tags? - javascriptCan we enter the pin with FTP data - puttyMagento Headers Already Submitted - magentoExport all my emails from your Gmail account as xml - emailIncluding CSS file in TYPO3 Backend? - cssConvert string to TCHAR * in VC ++? - visual-c ++All Articles