private function _extractHttpStatusCode($headers){
    	$statusCode = null; 
        if (1 === preg_match("/(\\S+) +(\\d+) +([^\n\r]+)(?:\r?\n|\r)/", $headers, $matches)) {
        	//The matches array [entireMatchString, protocol, statusCode, the rest]
            $statusCode = $matches[2]; 
        }
        return $statusCode;
    }
private function _extractHttpStatusCode($headers){
    	$statusCode = null; 
        if (1 === preg_match("/(\\S+) +(\\d+) +([^\n\r]+)(?:\r?\n|\r)/", $headers, $matches)) {
        	//The matches array [entireMatchString, protocol, statusCode, the rest]
            $statusCode = $matches[2]; 
        }
        return $statusCode;
    }
private function _extractHttpStatusCode ( $ headers ) { $ statusCode = null ; if ( 1 === preg_match ( "/(\\S+) +(\\d+) +([^\n\r]+)(?:\r?\n|\r)/" , $ headers , $ matches ) ) { //The matches array [entireMatchString, protocol, statusCode, the rest] $ statusCode = $ matches [ 2 ] ; } return $ statusCode ; }
parse the status line of a header string for the proper format and
return the status code

Example: HTTP/1.1 200 OK
...
returns String statusCode or null if the status line can't be parsed
parse the status line of a header string for the proper format and return the status code