src/Wikimedia/AtEase/AtEase.php
public static function suppressWarnings( $end = false ) {
		if ( $end ) {
			if ( self::$suppressCount ) {
				--self::$suppressCount;
				if ( !self::$suppressCount ) {
					error_reporting( self::$originalLevel );
				}
			}
		} else {
			if ( !self::$suppressCount ) {
				self::$originalLevel =
					error_reporting( E_ALL & ~(
						E_WARNING |
						E_NOTICE |
						E_USER_WARNING |
						E_USER_NOTICE |
						E_DEPRECATED |
						E_USER_DEPRECATED |
						E_STRICT
					) );
			}
			++self::$suppressCount;
		}
	}
public static function suppressWarnings( $end = false ) {
		if ( $end ) {
			if ( self::$suppressCount ) {
				--self::$suppressCount;
				if ( !self::$suppressCount ) {
					error_reporting( self::$originalLevel );
				}
			}
		} else {
			if ( !self::$suppressCount ) {
				self::$originalLevel =
					error_reporting( E_ALL & ~(
						E_WARNING |
						E_NOTICE |
						E_USER_WARNING |
						E_USER_NOTICE |
						E_DEPRECATED |
						E_USER_DEPRECATED |
						E_STRICT
					) );
			}
			++self::$suppressCount;
		}
	}
public static function suppressWarnings ( $ end = false ) { if ( $ end ) { if ( self :: $ suppressCount ) { -- self :: $ suppressCount ; if ( ! self :: $ suppressCount ) { error_reporting ( self :: $ originalLevel ) ; } } } else { if ( ! self :: $ suppressCount ) { self :: $ originalLevel = error_reporting ( E_ALL & ~ ( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT ) ) ; } ++ self :: $ suppressCount ; } }
Reference-counted warning suppression

@param bool $end Whether to restore warnings
Reference - counted warning suppression