PHPackages                             lakuapik/php-helper-id - 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. lakuapik/php-helper-id

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

lakuapik/php-helper-id
======================

Kumpulan fungsi bantuan PHP yang digunakan secara umum di Indonesia.

v1.0.1(3y ago)267MITPHPPHP ^5.6|^7.0|^8.0

Since Feb 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lakuapik/php-helper-id)[ Packagist](https://packagist.org/packages/lakuapik/php-helper-id)[ Docs](https://github.com/lakuapik/php-helper-id)[ RSS](/packages/lakuapik-php-helper-id/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

php-helper-id
=============

[](#php-helper-id)

[![Version](https://camo.githubusercontent.com/2427b43e759bf1030db7c8cffaa98418cebe03a1d2f0c419017ead9a8f67040c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616b756170696b2f7068702d68656c7065722d6964)](https://camo.githubusercontent.com/2427b43e759bf1030db7c8cffaa98418cebe03a1d2f0c419017ead9a8f67040c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616b756170696b2f7068702d68656c7065722d6964)[![Downloads](https://camo.githubusercontent.com/f652267d2c68111dd79bad2f3e2d79a0347145b13ea8f11c05895c7e09c82df1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c616b756170696b2f7068702d68656c7065722d6964)](https://camo.githubusercontent.com/f652267d2c68111dd79bad2f3e2d79a0347145b13ea8f11c05895c7e09c82df1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c616b756170696b2f7068702d68656c7065722d6964)[![License](https://camo.githubusercontent.com/83ddf04acc7e121bd41a37591c1b28bc3c7de436ffc93c9e9e344e3720bee24b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c616b756170696b2f7068702d68656c7065722d6964)](https://camo.githubusercontent.com/83ddf04acc7e121bd41a37591c1b28bc3c7de436ffc93c9e9e344e3720bee24b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c616b756170696b2f7068702d68656c7065722d6964)

Kumpulan fungsi bantuan PHP yang digunakan secara umum di Indonesia.

Instalasi
---------

[](#instalasi)

```
composer require lakuapik/php-helper-id

```

Fungsi
------

[](#fungsi)

- [ribuan](#ribuan)
- [re\_ribuan](#re_ribuan)
- [romawi](#romawi)
- [rupiah](#rupiah)
- [re\_rupiah](#re_rupiah)
- [terbilang](#terbilang)
- [re\_terbilang](#re_terbilang)
- [tertanggal](#tertanggal)
- [re\_tertanggal](#re_tertanggal)

Penggunaan
----------

[](#penggunaan)

### ribuan

[](#ribuan)

```
/**
 * Ubah angka menjadi format ribuan.
 *
 * @param int|string $angka
 * @param int        $desimal jumlah desimal dibelakang koma
 * @param string     $prefix
 * @param string     $suffix
 *
 * @return string
 */

echo ribuan(20000); // 20.000
echo ribuan(48951.22, 1); // 48.951,2
echo ribuan(9014555.9245); // 9.014.556
echo ribuan(222123.16, 1, '$'); // $222.123,2
echo ribuan(14500, 2, 'Per ', ' unit'); // 'Per 14.500,00 unit',
```

### re\_ribuan

[](#re_ribuan)

```
/**
 * Ubah angka dari format ribuan ke angka biasa.
 *
 * @param string $ribuan
 * @param int    $desimal jumlah desimal dibelakang koma
 *
 * @return int|float
 */

echo re_ribuan('100.000'); // 100000
echo re_ribuan('111.234.135', 2); // 111234135
echo re_ribuan('345,1111111111', 2); // 345.11
echo re_ribuan('$222.123,16', 1); // 222123.2
echo re_ribuan('Per 14.500,00 unit'); // 14500
```

### romawi

[](#romawi)

```
/**
 * Ubah angka menjadi format romawi.
 *
 * @param int|string $angka
 * @param boolean    $kapital
 *
 * @return string
 */

echo romawi(1000); // M
echo romawi('1234'); // MCCXXXIV
echo romawi(1234, false); // mccxxxiv
```

### rupiah

[](#rupiah)

```
/**
 * Ubah angka menjadi format rupiah.
 *
 * @param int|string $angka
 * @param int        $desimal jumlah desimal dibelakang koma
 *
 * @return string
 */

echo rupiah(100000); // Rp. 100.000
echo rupiah('525000'); // Rp. 525.000
echo rupiah(178245123.01234, 2); // Rp. 178.245.123,01
echo rupiah('212.2', 2); // Rp. 212,20
```

### re\_rupiah

[](#re_rupiah)

```
 /**
 * Ubah angka dari format rupiah ke angka biasa.
 *
 * Contoh:
 *
 * @param string $rupiah
 * @param int    $desimal jumlah desimal dibelakang koma
 *
 * @return int|float
 */

echo re_rupiah('Rp. 100.000'); // 100000
echo re_rupiah('Rp. 525.000'); // 525000
echo re_rupiah('Rp. 178.245.123,01234', 2); // 178245123.01
echo re_rupiah('Rp. 212,20', 2); // 212.2
```

### terbilang

[](#terbilang)

```
/**
 * Ubah angka menjadi kalimat terbilang.
 *
 * @param int|string $angka
 *
 * @return string
 */

echo terbilang(99); // sembilan puluh sembilan
echo terbilang(-554); // minus lima ratus lima puluh empat
echo terbilang('1234567'); // satu juta dua ratus tiga puluh empat ribu lima ratus enam puluh tujuh
echo terbilang(333.3); // tiga ratus tiga puluh tiga koma tiga
echo terbilang(1000000000000000); // satu kuadriliun
```

### re\_terbilang

[](#re_terbilang)

```
/**
 * Ubah angka dari format terbilang ke angka biasa.
 *
 * @param string $terb kalimat terbilang
 * @param int    $desimal jumlah desimal dibelakang koma
 *
 * @return int|float
 */

echo re_terbilang('sembilan puluh sembilan'); // 99
echo re_terbilang('minus lima ratus lima puluh empat'); // -554
echo re_terbilang('satu juta dua ratus tiga puluh empat ribu lima ratus enam puluh tujuh'); // 1234567
echo re_terbilang('tiga ratus tiga puluh tiga koma tiga'); // 333.3
echo re_terbilang('dua koma lima ratus dua puluh tiga', 1); // 2.5
echo re_terbilang('satu kuadriliun'); // 1000000000000000
```

### tertanggal

[](#tertanggal)

```
/**
 * Ubah tanggal menjadi kalimat tertanggal.
 *
 * @param string $tanggal
 *
 * @return string
 */

echo tertanggal('2019-01-01'); // tanggal satu bulan januari tahun dua ribu sembilan belas
echo tertanggal('23 Feb 2016'); // tanggal dua puluh tiga bulan februari tahun dua ribu enam belas
echo tertanggal('1945/08/17'); // tanggal tujuh belas bulan agustus tahun seribu sembilan ratus empat puluh lima
echo tertanggal('2 Mei 2000'); // tanggal dua bulan mei tahun dua ribu
echo tertanggal('24 Okt 1800'); // tanggal dua puluh empat bulan oktober tahun seribu delapan ratus
echo tertanggal('1 June 2100'); // tanggal satu bulan juni tahun dua ribu seratus
```

### re\_tertanggal

[](#re_tertanggal)

```
/**
 * Ubah angka dari format tertanggal ke tanggal biasa sesuai format yang diberikan.
 *
 * Format mengacu ke: @link https://www.php.net/manual/en/function.strftime
 * Menggunakan strftime karena mengubah format tanggal ke lokal indonesia.
 *
 * @param string $tertanggal kalimat tertanggal
 * @param string $format format tanggal
 * @param bool   $asDate apakah return sebagai php date
 *
 * @return string|\DateTime
 */

echo re_tertanggal('tanggal satu bulan januari tahun dua ribu sembilan belas'); // 2019-01-01
echo re_tertanggal('tanggal dua puluh tiga bulan februari tahun dua ribu enam belas', '%d %b %Y'); //  23 Feb 2016
echo re_tertanggal('tanggal tujuh belas bulan agustus tahun seribu sembilan ratus empat puluh lima', '%Y/%m/%d'); // 1945/08/17
echo re_tertanggal('tanggal dua bulan mei tahun dua ribu', '%e %B %Y'); // 2 Mei 2000
echo re_tertanggal('tanggal dua puluh empat bulan oktober tahun seribu delapan ratus', '%e %b %Y'); // 24 Okt 1800
echo re_tertanggal('tanggal satu bulan juni tahun dua ribu seratus', '%d %B %Y', false, 'en_US'); // 01 June 2100
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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 ~434 days

Total

3

Last Release

1406d ago

Major Versions

0.0.1 → 1.0.02020-03-31

PHP version history (2 changes)0.0.1PHP &gt;=5.6

v1.0.1PHP ^5.6|^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/58328fa344fd0959aaf080fa3c82759eae15270ac62c25a64ddc23f65f66edce?d=identicon)[lakuapik](/maintainers/lakuapik)

---

Top Contributors

[![lakuapik](https://avatars.githubusercontent.com/u/20186786?v=4)](https://github.com/lakuapik "lakuapik (14 commits)")

---

Tags

hacktoberfestphpphp-helpersphp-indonesiaphp-libraryphpphp helperphp indonesiafungsi php indonesia

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/lakuapik-php-helper-id/health.svg)

```
[![Health](https://phpackages.com/badges/lakuapik-php-helper-id/health.svg)](https://phpackages.com/packages/lakuapik-php-helper-id)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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