Function: error_reporting version 131

Function:
Description: Return the current error_reporting level, and if an argument was passed - change to the new level.
Version:
Status: latest
Date: 2011-12-20 05:53
Summary: Import from phpjs.
Programmer: jj5
Code
1
2
3
4
5
6
7
8
9
10
11
12
function error_reporting (level) {
    // http://jsphp.co/jsphp/fn/view/error_reporting
    // +   original by: Brett Zamir (http://brett-zamir.me)
    // -    depends on: ini_set
    // %        note 1: This will not set a global_value or access level for the ini item
    // %        note 2: If you wish the default value to be as in PHP, you must manually set it
    // %        note 3: This function depends on functions implementing error handling
    // %        note 4: See also our at() error suppressor function (@ operator in PHP) in experimental/language/
    // *     example 1: error_reporting(1);
    // *     returns 1: 6135
    return this.ini_set('error_reporting', level);
}
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.