PHPackages                             andimg93/disposable-mail-detection - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. andimg93/disposable-mail-detection

ActiveLibrary[Testing &amp; Quality](/categories/testing)

andimg93/disposable-mail-detection
==================================

Temporary (disposable/throwaway) email detection library - Throwaway mail addresses are a plague, but one you don't have to worry about anymore.

1.2.58(4y ago)32151MITPHPPHP &gt;=7.3

Since Dec 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/andimg93/DisposableMailDetection)[ Packagist](https://packagist.org/packages/andimg93/disposable-mail-detection)[ RSS](/packages/andimg93-disposable-mail-detection/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)DependenciesVersions (90)Used By (0)

PHP - Disposable Email Addresses Detection
------------------------------------------

[](#php---disposable-email-addresses-detection)

After I had to realize that there is no good, fast and well maintained package for the detection of disposable mail addresses - I have now created one myself.

About **149k+ unique disposable mail providers** are currently stored. Not a single address exists twice - **No duplicates**! PHP related there is no better performing package for validation. This is based on a simple isset check for the relevant mail part, which would be much faster than an in\_array one - Particularly with such a large lookup/array. The advantage of isset compared to in\_array is briefly explained as follows:

- It uses an O(1) hash search on the key whereas in\_array must check every value until it finds a match
- Being an opcode, it has less overhead than calling the in\_array built-in function

The advantages of this package are therefore obvious:

- Outstanding performance
- The package with presumably the most deposited disposable mail addresses
- No dependencies to various other packages
- Entirely free of charge

Get it via composer:

```
composer require andimg93/disposable-mail-detection
```

**Usage**

```
