PHPackages                             openlss/func-mimetype - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. openlss/func-mimetype

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

openlss/func-mimetype
=====================

Mimetype helper functions

0.0.7(13y ago)0142LGPL-3.0+PHPPHP &gt;=5.3.2

Since Mar 23Pushed 13y ago1 watchersCompare

[ Source](https://github.com/nullivex/func-mimetype)[ Packagist](https://packagist.org/packages/openlss/func-mimetype)[ Docs](http://openlss.org)[ RSS](/packages/openlss-func-mimetype/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (9)Used By (0)

func-mimetype
=============

[](#func-mimetype)

Mimetype helper functions

Usage
-----

[](#usage)

```
$file = 'test.html';
$mimetype = system_extension_mime_type($file); //returns text/html
$ext = system_mime_type_extension('text/html'); //returns .html
```

Reference
---------

[](#reference)

### (string) system\_extension\_mime\_type($file)

[](#string-system_extension_mime_typefile)

Returns the mime type purely by file extension

### (string) system\_mime\_type\_extension($mimetype)

[](#string-system_mime_type_extensionmimetype)

Returns the file extension assoicated with the mime type

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

4843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83c8e9d55e3ebafb0621a441a51af8f551f61a274fde5400459a29cc320b7b75?d=identicon)[nullivex](/maintainers/nullivex)

![](https://www.gravatar.com/avatar/afffa5c56642e74ba5b880c4b78e115c1b8d00c74ceae5644ac359d10058a911?d=identicon)[spudz76](/maintainers/spudz76)

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (7 commits)")

---

Tags

mimetypefile extension

### Embed Badge

![Health badge](/badges/openlss-func-mimetype/health.svg)

```
[![Health](https://phpackages.com/badges/openlss-func-mimetype/health.svg)](https://phpackages.com/packages/openlss-func-mimetype)
```

###  Alternatives

[wapmorgan/file-type-detector

Detects file type by filename or content and generates correct mimetype.

33374.3k2](/packages/wapmorgan-file-type-detector)[dfridrich/php-mime-type

Simple PHP class for guessing file mime type based on file extension with ability to use in Symfony project.

17281.3k3](/packages/dfridrich-php-mime-type)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
