PHPackages                             y0x54a/nik-php - 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. y0x54a/nik-php

ActiveLibrary

y0x54a/nik-php
==============

y0x54a/nik-php

0.1.0(3y ago)19Apache-2.0PHPPHP &gt;=7.2.5

Since Mar 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/y0x54a/nik-php)[ Packagist](https://packagist.org/packages/y0x54a/nik-php)[ RSS](/packages/y0x54a-nik-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

nik-php
=======

[](#nik-php)

[![packagist](https://camo.githubusercontent.com/16c9e32dfc0d47aee8532720d6d385431be57d456f921a57cef568ffe40a285e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7930783534612f6e696b2d706870)](https://packagist.org/packages/y0x54a/nik-php)[![Build Status](https://github.com/y0x54a/nik-php/workflows/ci/badge.svg?branch=main)](https://github.com/y0x54a/nik-php/actions)[![codecov](https://camo.githubusercontent.com/d792445e43117e262f58a73ec0a107340ed635c916e93fe76f60cef32915b0b2/68747470733a2f2f636f6465636f762e696f2f67682f7930783534612f6e696b2d7068702f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d31395854595352444c51)](https://codecov.io/gh/y0x54a/nik-php)

Installing
----------

[](#installing)

```
composer require y0x54a/nik-php
```

Example
-------

[](#example)

```
use Y0x54a\Nik\Nik;
```

```
$maleNik = new Nik('0102030405060001');

$maleNik->getRaw();
// 0102030405060001

$maleNik->getProvince();
// 1

$maleNik->getRawProvince();
// 01

$maleNik->getRegency();
// 2

$maleNik->getRawRegency();
// 02

$maleNik->getDistrict();
// 3

$maleNik->getRawDistrict();
// 03

$maleNik->getDob();
// DateTime(..06-05-04)

$maleNik->getRawDob();
// 040506

$maleNik->getDobDay();
// 4

$maleNik->getRawDobDay();
// 04

$maleNik->getDobMonth();
// 5

$maleNik->getRawDobMonth();
// 05

$maleNik->getDobYear();
// 6

$maleNik->getRawDobYear();
// 06

$maleNik->getSequence();
// 1

$maleNik->getRawSequence();
// 0001

$maleNik->isFemale();
// false

$maleNik->__toString();
// 0102030405060001
```

```
$femaleNik = new Nik('0102034405060001');

$femaleNik->getRaw();
// 0102034405060001

$femaleNik->getProvince();
// 1

$femaleNik->getRawProvince();
// 01

$femaleNik->getRegency();
// 2

$femaleNik->getRawRegency();
// 02

$femaleNik->getDistrict();
// 3

$femaleNik->getRawDistrict();
// 03

$femaleNik->getDob();
// DateTime(..06-05-04)

$femaleNik->getRawDob();
// 440506

$femaleNik->getDobDay();
// 44

$femaleNik->getRawDobDay();
// 44

$femaleNik->getDobMonth();
// 5

$femaleNik->getRawDobMonth();
// 05

$femaleNik->getDobYear();
// 6

$femaleNik->getRawDobYear();
// 06

$femaleNik->getSequence();
// 1

$femaleNik->getRawSequence();
// 0001

$femaleNik->isFemale();
// true

$femaleNik->__toString();
// 0102034405060001
```

API
---

[](#api)

- ### NikInterface

    [](#nikinterface)

    - **Methods**
    - `getRaw(): string`
    - `getProvince(): int`
    - `getRawProvince(): string`
    - `getRegency(): int`
    - `getRawRegency(): string`
    - `getDistrict(): int`
    - `getRawDistrict(): string`
    - `getDob(): DateTimeInterface`
    - `getRawDob(): string`
    - `getDobDay(): int`
    - `getRawDobDay(): string`
    - `getDobMonth(): int`
    - `getRawDobMonth(): string`
    - `getDobYear(): int`
    - `getRawDobYear(): string`
    - `getSequence(): int`
    - `getRawSequence(): string`
    - `isFemale(): bool`
    - `__toString(): string`
- ### Nik

    [](#nik)

    - **Methods**
    - `__construct(string | NikInterface $raw)`
    - `getRaw(): string`
    - `getProvince(): int`
    - `getRawProvince(): string`
    - `getRegency(): int`
    - `getRawRegency(): string`
    - `getDistrict(): int`
    - `getRawDistrict(): string`
    - `getDob(): DateTimeInterface`
    - `getRawDob(): string`
    - `getDobDay(): int`
    - `getRawDobDay(): string`
    - `getDobMonth(): int`
    - `getRawDobMonth(): string`
    - `getDobYear(): int`
    - `getRawDobYear(): string`
    - `getSequence(): int`
    - `getRawSequence(): string`
    - `isFemale(): bool`
    - `__toString(): string`

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1162d ago

### Community

Maintainers

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

---

Top Contributors

[![y0x54a](https://avatars.githubusercontent.com/u/106418451?v=4)](https://github.com/y0x54a "y0x54a (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/y0x54a-nik-php/health.svg)

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

PHPackages © 2026

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