What is the Function of Error_reporting (0)

2

What is the function of the code: Error_reporting(0) , I know it is to report an error, and in parenthesis I report the level, but in the documentation of PHP I did not find that level 0.

    
asked by anonymous 21.12.2017 / 13:36

2 answers

1

error_reporting() defines which types of errors to display, this includes warnings, compile errors, syntax etc. By zeroing this is interpreted as false or will not display any error when they occur.

To display all error types pass -1.

The list of error levels is listed in the documentation

    
21.12.2017 / 13:50
0

Documentation informs sim.

  

Example # 1 Examples error_reporting ()

<?php
    //Turn off all error reporting
    error_reporting(0);
    
21.12.2017 / 13:41