PHPackages                             showapp/tld-support - 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. showapp/tld-support

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

showapp/tld-support
===================

Support package for TLDDatabase and TLDExtract

021PHP

Since Feb 17Pushed 3y agoCompare

[ Source](https://github.com/ShowappSoftware/TLDSupport)[ Packagist](https://packagist.org/packages/showapp/tld-support)[ RSS](/packages/showapp-tld-support/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TLDSupport
==========

[](#tldsupport)

Support package for [TLDDatabase](https://github.com/layershifter/TLDDatabase) and [TLDExtract](https://github.com/layershifter/TLDExtract). This package provides helpers for work with arrays, IP addresses, strings and more.

[![Build Status](https://camo.githubusercontent.com/afc7c9e7ba1bf42ba578799efddcd0516a4bf1328d4a3c9d1258407ded68aa9a/68747470733a2f2f7472617669732d63692e6f72672f6c61796572736869667465722f544c44537570706f72742e737667)](https://travis-ci.org/layershifter/TLDSupport) [![Code Climate](https://camo.githubusercontent.com/1202a8dbd8f526224e7a2b7750d9775d4d5072de92e52684340c71ce97ce0942/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c61796572736869667465722f544c44537570706f72742f6261646765732f6770612e737667)](https://codeclimate.com/github/layershifter/TLDSupport) [![Test Coverage](https://camo.githubusercontent.com/e95dcbdc47003d9c5d7f81038400b3f872b9bb6ef572791baec4cf7175bbed47/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c61796572736869667465722f544c44537570706f72742f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/layershifter/TLDSupport/coverage) [![PHP 7 ready](https://camo.githubusercontent.com/5037015723f81b89cf5bdb6003a8cded1de3b68f494fd83f41e4802c9ec9f563/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f6c61796572736869667465722f544c44537570706f72742f6d61737465722f62616467652e737667)](https://travis-ci.org/layershifter/TLDSupport%7D)

---

This package is compliant with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

Requirements
------------

[](#requirements)

The following versions of PHP are supported.

- PHP 5.5
- PHP 5.6
- PHP 7.0
- HHVM

Usage
-----

[](#usage)

### Arrays:

[](#arrays)

```
mixed Arr::first(array $haystack, null|callable $callback, mixed $default);
mixed Arr::last(array $haystack, null|callable $callback, mixed $default);
```

### IP addresses:

[](#ip-addresses)

```
bool IP::isValid(string $hostname);
```

### Strings:

[](#strings)

```
bool     Str::endsWith(string $haystack, string|array $needles);
int      Str::length(string $value);
string   Str::lower(string $value);
string   Str::substr(string $string, int $start, int|null $length = null);
bool     Str::startsWith(string $haystack, string|array $needles);
bool|int Str::strpos(string $haystack, string $needles, int $offset = 0);
bool|int Str::strrpos(string $haystack, string $needles, int $offset = 0);
```

### Mixed:

[](#mixed)

```
mixed Mixed::value(mixed $value);
```

Install
-------

[](#install)

Via Composer

```
$ composer require layershifter/tld-support
```

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

License
-------

[](#license)

This library is released under the Apache 2.0 license. Please see [License File](LICENSE) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/10a86f62700463c33136d05df7b21b2c4608ef2b0ab8ecdf9befc45e4593cffd?d=identicon)[showapp](/maintainers/showapp)

---

Top Contributors

[![layershifter](https://avatars.githubusercontent.com/u/14183168?v=4)](https://github.com/layershifter "layershifter (9 commits)")[![ShowappSoftware](https://avatars.githubusercontent.com/u/49631525?v=4)](https://github.com/ShowappSoftware "ShowappSoftware (2 commits)")

### Embed Badge

![Health badge](/badges/showapp-tld-support/health.svg)

```
[![Health](https://phpackages.com/badges/showapp-tld-support/health.svg)](https://phpackages.com/packages/showapp-tld-support)
```

###  Alternatives

[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M35](/packages/shipmonk-name-collision-detector)[bostondv/bootstrap-ninja-forms

Adds Bootstrap classes to Ninja Forms

222.2k](/packages/bostondv-bootstrap-ninja-forms)

PHPackages © 2026

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