Powered By Blogger

Tuesday, 8 February 2011

The error suppression operator

error suppression operator @ should be kept before the anything that evaluates  to be some value.

$a=@(300/0);

in this way the divide by zero error will not be generated during the runtime although you will need to write some error handling code when the warning is generated.....

if you have track_error option enabled in php.ini file then this message will be stored in $php_errormsg variable.....

No comments:

Post a Comment