What is the Function of Error_reporting(0)

Asked

Viewed 337 times

2

What is the function of the code: Error_reporting(0), I know it is to report an error, and between parentheses inform the level, but in the documentation of the PHP I haven’t found that level 0.

2 answers

1


error_reporting() sets what types of errors will be displayed, this includes warnings, build errors, syntax etc. When setting zero it is interpreted to be false or will not display any errors when they happen.

To display all types of pass-1 errors.

The list of counts the error rates is in documentation

  • Thanks rray I did not find this information anywhere that when putting zero is interpleted as false, solved my problem.

  • 1

    @sol25lua the information is implicit in the last sentence, before the user notes, where explains that the function operates on bitmasks and operators bit-a-bit. If you know how these operators work, you’ll understand why zero disables all messages.

0

In the documentation it says yes.

Example #1 Examples error_reporting()

<?php
    //Turn off all error reporting
    error_reporting(0);
  • I did not find in the documentation level 0, this in the question

Browser other questions tagged

You are not signed in. Login or sign up in order to post.