php – Parse header information

I analyze the header information of a matrix like this:

matrix
0 => & # 39; HTTP / 1.1 200 OK & # 39 ;,
1 => & # 39; Date: Mon, June 17, 2019 19:32:37 GMT & # 39 ;,
2 => & # 39; Server: Apache / 2.4.38 (Win32) OpenSSL / 1.1.1a PHP / 7.2.15 & # 39 ;,
3 => & # 39; X-Powered By: PHP / 7.2.15 & # 39 ;,
4 => & # 39; Set-Cookie: Avisistema = ihk9t1ms6r8i0u1j5t6jpjrqei; path = /; HttpOnly & # 39 ;,
5 => & # 39; Expires: Thu, November 19, 1981 08:52:00 GMT & # 39 ;,
6 => & # 39; Cache-Control: no-store, no-cache, must-revalidate & # 39 ;,
7 => & # 39; Pragma: no-cache & # 39 ;,
8 => & # 39; Set-Cookie: Avisistema = ihk9t1ms6r8i0u1j5t6jpjrqei; expires = Mar, 18-Jun-2019 03:32:37 GMT; Maximum age = 28799; path = /; HttpOnly & # 39 ;,
9 => & # 39; Set-Cookie: SageFirmeware = Avisistema.A.0.2015.01.10; expires = Mar, 18-Jun-2019 03:32:37 GMT; Maximum age = 28799; path = /; HttpOnly & # 39 ;,
10 => & # 39; Content-Length: 232 & # 39 ;,
11 => & # 39; Content-Type: application / json & # 39 ;,
)

I determine which Type of content I use with this code:

                // construction of the matrix:
$ header = array_filter (explode (PHP_EOL, substr ($ Data, 0, curl_getinfo ($ ch, CURLINFO_HEADER_SIZE))));
// Array Walk ...
foreach ($ header as $ line) {
$ read = explode (& # 39;: & # 39 ;, $ line);
if (strpos ($ leed[0], "Type of content")! == false) {
$ head = str_replace (& # 39; & # 39 ;, & # 39; & # 39 ;, $ leed[1]);
}
}

Is there any shorter alternative?