| Conditions | 8 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 3 | function generateUpToDateMimeArray(string $url): array |
||
| 4 | { |
||
| 5 | $s = array(); |
||
| 6 | foreach (@explode("\n", @file_get_contents($url)) as $x) { |
||
|
|
|||
| 7 | if (isset($x[0]) && $x[0] !== '#' && preg_match_all('#([^\s]+)#', $x, $out) && isset($out[1]) && ($c = count($out[1])) > 1) { |
||
| 8 | for ($i = 1; $i < $c; $i++) { |
||
| 9 | $s[$out[1][$i]] = $out[1][0]; |
||
| 10 | } |
||
| 11 | } |
||
| 12 | } |
||
| 13 | return $s; |
||
| 14 | } |
||
| 17 | echo '<pre>' . json_encode($data, JSON_PRETTY_PRINT) . '</pre>'; |