Skip to content

Commit 4c8ba98

Browse files
committed
Sort extensions alphabetically
This makes it easier to compare mime data from different sources.
1 parent 5889c41 commit 4c8ba98

File tree

2 files changed

+870
-866
lines changed

2 files changed

+870
-866
lines changed

sapi/cli/generate_mime_type_map.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@
3636
if (!isset($extensions[$ext])) {
3737
$extensions[$ext] = $mime;
3838
} else {
39-
printf(STDERR, "Ignored exist mime type: $ext => $mime\n");
39+
fprintf(STDERR, "Ignored exist mime type: $ext => $mime\n");
4040
}
4141
}
4242

43+
uksort($extensions, function($ext1, $ext2) {
44+
return strcmp($ext1, $ext2);
45+
});
46+
4347
echo <<<HEADER
4448
/*
4549
+----------------------------------------------------------------------+

0 commit comments

Comments
 (0)