Personal Identification Number (OIB) validator for Croatian citizens

Maintainers

Details

github.com/toniperic/oib

Source

Issues

Installs: 38

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/toniperic/oib

1.0.0 2015-04-19 16:31 UTC

This package is not auto-updated.

Last update: 2025-10-11 23:27:26 UTC


README

Build Status Latest Stable Version License

Introduction

Personal Identification Number (Croatian: Osobni identifikacijski broj or OIB) is a permanent national identification number of every Croatian citizen and legal persons domiciled in the Republic of Croatia.

Installation

Just pull the package via Composer

"require": {
    "toniperic/oib": "~1.0"
}

Usage

You can check whether an OIB is valid likewise

Oib::validate('foo'); // false
Oib::validate(71481280786); // true

You could also specify an array as first parameter, likewise

Oib::validate(array(71481280786, 64217529143, 'foo'));

and the returned result would be

array(3) {              
  ["71481280786"] => bool(true)            
  ["64217529143"] => bool(true)            
  ["foo"] => bool(false)           
}                       

Feel free to check the tests if you still can't understand how the package works.