PHPackages                             unreal4u/rutverifier - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. unreal4u/rutverifier

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

unreal4u/rutverifier
====================

This class is able to do integrity verification on chilean RUTs and RUNs

v2.2.1(12y ago)0851MITPHPPHP &gt;=5.3.0

Since Dec 26Pushed 12y agoCompare

[ Source](https://github.com/unreal4u/rutverifier)[ Packagist](https://packagist.org/packages/unreal4u/rutverifier)[ RSS](/packages/unreal4u-rutverifier/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (2)Versions (15)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/ef50cff71b81acf5d86b9871144cd4b037a13b80b1c4fdcc491f63639dfaf630/68747470733a2f2f706f7365722e707567782e6f72672f756e7265616c34752f72757476657269666965722f762f737461626c652e706e67)](https://packagist.org/packages/unreal4u/rutverifier)[![Build Status](https://camo.githubusercontent.com/c7b754826ceaefec071939544ea298ffd4992b4548291f3d8b26d46a924961f7/68747470733a2f2f7472617669732d63692e6f72672f756e7265616c34752f72757476657269666965722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/unreal4u/rutverifier)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a66a019e8dac6718cdba0bd943cd0be81452b1f65a12965929cdf5e5b317ffea/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f756e7265616c34752f72757476657269666965722f6261646765732f7175616c6974792d73636f72652e706e673f733d34316239613063373232373932323264306535313732353635656134663939343462366330653565)](https://scrutinizer-ci.com/g/unreal4u/rutverifier/)[![Code Coverage](https://camo.githubusercontent.com/99c4723e8f808eee16758c4b36c5b595796eb45452f989274a694359893ffe3a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f756e7265616c34752f72757476657269666965722f6261646765732f636f7665726167652e706e673f733d62663962636333363830336136303564346637643265363432633162323634386166393463623263)](https://scrutinizer-ci.com/g/unreal4u/rutverifier/)[![License](https://camo.githubusercontent.com/29851b0f00ef5f1a1cbe88082a940e7b17a9492bef660efa7f660c0913b66af8/68747470733a2f2f706f7365722e707567782e6f72672f756e7265616c34752f72757476657269666965722f6c6963656e73652e706e67)](https://packagist.org/packages/unreal4u/rutverifier)

rutverifier.php
===============

[](#rutverifierphp)

Credits
-------

[](#credits)

This class is made by unreal4u (Camilo Sperberg) [Homepage](http://unreal4u.com/)

About this class
----------------

[](#about-this-class)

- Can be used to verify chilean RUT (Rol único tributario) or RUN (Rol único nacional). ([Difference](http://www.registrocivil.cl/PortalOI/html/faq/Cod_Area_4/Cod_Tema_30/pregunta_155.html) \[spanish\])
- Will give you some information, such as the RUT/RUN being consulted is an enterprise (RUT) or a natural person (RUN).
- Allows you to make use of a blacklist (Useful for known frauders).
- Will also format the RUT/RUN into the correct format.
- Can deliver also a pure (more basic) Javascript coded version to verify the validity of a RUT/RUN

Detailed description
--------------------

[](#detailed-description)

This package will do all kinds of things you can do with a RUT or RUN, such as:

- Verifying that it is valid.
- Finding out whether it is a RUT or a RUN.
- Format it to the correct format to use / store / work with

Basic usage
-----------

[](#basic-usage)

```
include('src/unreal4u/rutverifier.php');
$rutVerifier = new unreal4u\rutverifier();
$result = $rutVerifier->isValidRUT('30.686.957-4');
```

- Congratulations! Result does now contain true or false depending on the RUT/RUN being valid or not.
- **Please see examples for more options and advanced usage**

Composer
--------

[](#composer)

This class has support for Composer install. Just add the following section to your composer.json with:

```
{
    "require": {
        "unreal4u/rutverifier": "@stable"
    }
}
```

Now you can instantiate a new rutverifier class by executing:

```
require('vendor/autoload.php');

$rutverifier = new unreal4u\rutverifier();
```

Don't forget to do a `composer.phar install` or download and include `http://packagist.org/unreal4u/rutverifier-js` manually

Pending
-------

[](#pending)

- Class will throw exceptions instead of adding silently to an internal error array
- Native i18n support

Version History
---------------

[](#version-history)

- 1.0 :
    - Initial version
- 1.1:
    - PHPUnit testing
    - Documentation improved (Created this README actually)
    - More examples
    - Solved some bugs
- 1.2:
    - Compatibility with composer
    - Better documentation
- 1.2.1:
    - Real compatibility with composer
- 1.2.2:
    - Minor bugs in documentation
- 1.2.4:
    - Documentation
    - Better PHPUnit tests
    - Fixed a bug related to cache and blacklisting
    - Included PHPDocumentor to src code
- 1.2.6:
    - Excluded PHPDocumentation
- 1.2.8:
    - Travis-CI support
    - Very small optimization on Javascript function
    - Began deprecating some old naming conventions
- 2.0.0:
    - Removed c\_javascript function
    - Standarized data type on return for all functions, no more mixed types
    - Updated PHPUnit dependency to latest stable version
    - Will now test PHP 5.3 in Travis-CI as well
    - Class will now sprintf into the error array in preparation for later i18n implementation
- 2.1.0:
    - Now checking JavaScript code with grunt
- 2.2.0:
    - This class has now a dependency on unreal4u/rutverifier-js, downloadable on packagist
    - Cleaned up javascript code that had nothing to do with PHP

Contact the author
------------------

[](#contact-the-author)

- Twitter: [@unreal4u](http://twitter.com/unreal4u)
- Website:
- Github:

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

Every ~6 days

Total

14

Last Release

4479d ago

Major Versions

v1.2.10 → v2.0.02014-03-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/43792f8b224d7de339a848cd799635fa8e062eea3fb669e3ca7a1d1e2cff756d?d=identicon)[unreal4u](/maintainers/unreal4u)

---

Top Contributors

[![unreal4u](https://avatars.githubusercontent.com/u/194999?v=4)](https://github.com/unreal4u "unreal4u (47 commits)")

---

Tags

runrutchilerutverifiercarnet de identidadcedula de identidad

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/unreal4u-rutverifier/health.svg)

```
[![Health](https://phpackages.com/badges/unreal4u-rutverifier/health.svg)](https://phpackages.com/packages/unreal4u-rutverifier)
```

###  Alternatives

[freshwork/chilean-bundle

A PHP composer package with Chilean validations, common variables, etc. (RUT, IVA, ETC). Ready for Laravel 5. Grande chile ctm :)

98203.8k4](/packages/freshwork-chilean-bundle)[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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