PHPackages                             barttyrant/php\_genderize - 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. barttyrant/php\_genderize

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

barttyrant/php\_genderize
=========================

Genderize.io handler for PHP

24100.0k↓23.9%12[2 PRs](https://github.com/barttyrant/php_genderize/pulls)1PHP

Since Aug 23Pushed 8y ago3 watchersCompare

[ Source](https://github.com/barttyrant/php_genderize)[ Packagist](https://packagist.org/packages/barttyrant/php_genderize)[ RSS](/packages/barttyrant-php-genderize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

php\_genderize
==============

[](#php_genderize)

PHP5 lib for handling genderize.io gender recognition

Basicaly, it's for guessing the gender by a given first name and using [genderize.io](http://genderize.io).

Author: Bart Tyrant Contributors: Luke Shaheen @tlshaheen License: The MIT License

==Usage:==

The simplest case:

```
$recognizer = new \Genderize\Base\Recognizer('Peter');

$peter = $recognizer->recognize();
print_r($peter);
```

will give:

Genderize\\Base\\Name Object ( \[\_name:protected\] =&gt; Peter \[\_count:protected\] =&gt; 4284 \[\_gender:protected\] =&gt; male \[\_probability:protected\] =&gt; 1.00 )

You can pass multiple names - at time of writing, genderizer.io accepts up to 10 at once

```
$recognizer = new \Genderize\Base\Recognizer(array('Peter', 'John'));

$namesinfo = $recognizer->recognize();
print_r($namesinfo);
```

will give:

array(\[0\] =&gt; Genderize\\Base\\Name Object ( \[\_name:protected\] =&gt; Peter \[\_count:protected\] =&gt; 4284 \[\_gender:protected\] =&gt; male \[\_probability:protected\] =&gt; 1.00 ), \[1\] =&gt; Genderize\\Base\\Name Object ( \[\_name:protected\] =&gt; Peter \[\_count:protected\] =&gt; 4284 \[\_gender:protected\] =&gt; male \[\_probability:protected\] =&gt; 1.00 ) )

\--

Also, country and language filters are supported:

```
$Recognizer = Genderize::factory();

$asia = $Recognizer->set_name('Asia')->recognize();
print_r($asia);

$asiaPL = $Recognizer->set_country_id('pl')->set_name('Asia')->recognize();
print_r($asiaPL);
```

... will print out:

Genderize\\Base\\Name Object ( \[\_name:protected\] =&gt; Asia \[\_count:protected\] =&gt; 97 \[\_gender:protected\] =&gt; female \[\_probability:protected\] =&gt; 0.99 ) Genderize\\Base\\Name Object ( \[\_name:protected\] =&gt; Asia \[\_count:protected\] =&gt; 26 \[\_gender:protected\] =&gt; female \[\_probability:protected\] =&gt; 1.00 \[\_country\_id\] =&gt; PL )

Have an API key from ? Use `$Recognizer->set_api_key($api_key)` to pass it with the request.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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/7fb11bc48a3e18b433e8acf52946f5199a958c97fc6dab46e341cc8c77283772?d=identicon)[barttyrant](/maintainers/barttyrant)

![](https://www.gravatar.com/avatar/4c5994614b0c11a405948d6263048b35d23200f4c29664d1b9550b5908d78508?d=identicon)[fpokoj](/maintainers/fpokoj)

---

Top Contributors

[![efanon](https://avatars.githubusercontent.com/u/17519170?v=4)](https://github.com/efanon "efanon (13 commits)")[![barttyrant](https://avatars.githubusercontent.com/u/1851020?v=4)](https://github.com/barttyrant "barttyrant (11 commits)")[![tlshaheen](https://avatars.githubusercontent.com/u/385724?v=4)](https://github.com/tlshaheen "tlshaheen (2 commits)")[![sadortun](https://avatars.githubusercontent.com/u/794449?v=4)](https://github.com/sadortun "sadortun (1 commits)")

### Embed Badge

![Health badge](/badges/barttyrant-php-genderize/health.svg)

```
[![Health](https://phpackages.com/badges/barttyrant-php-genderize/health.svg)](https://phpackages.com/packages/barttyrant-php-genderize)
```

###  Alternatives

[phpdocumentor/reflection-docblock

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

9.4k722.2M1.2k](/packages/phpdocumentor-reflection-docblock)[beste/json

A simple JSON helper to decode and encode JSON

4222.7M3](/packages/beste-json)

PHPackages © 2026

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