PHPackages                             rebib/phonenumbersplitter - 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. rebib/phonenumbersplitter

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

rebib/phonenumbersplitter
=========================

ハイフン無しの電話番号をハイフン付の形式に変換する

1.3.0(6y ago)117.7k↓30.3%2mitPHPPHP ^7.2

Since Oct 28Pushed 6y ago2 watchersCompare

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

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

ハイフンなしの電話番号をハイフン付の形式に変換する
=========================

[](#ハイフンなしの電話番号をハイフン付の形式に変換する)

- 電話番号を「市外局番-市内局番-識別番号」に分割
- ハイフン無しの電話番号をハイフン付の形式(「市外局番-市内局番-識別番号」)に復元
- ハイフン付の形式(「市外局番-市内局番-識別番号」)をハイフン無しの電話番号に変換
- 電話番号をハイフン区切りで整形

Installation
------------

[](#installation)

You can install this plugin with Composer.

```
$ composer require rebib/phonenumbersplitter
```

例
-

[](#例)

```
 $provider = (new Rebib\Phonenumber\Splitter())->parse("031-234-5678");
```

### ハイフン無し

[](#ハイフン無し)

```
echo $provider->getNumberWithoutHyphen();
```

```
0312345678

```

### ハイフン付

[](#ハイフン付)

```
 echo $provider->getNumberWithHyphen();
```

```
03-1234-5678

```

### array

[](#array)

```
 print_r($provider->toArray());
```

```
Array
(
    [0] => 03
    [1] => 1234
    [2] => 5678
)

```

参照
--

[](#参照)

- 総務省 [電気通信番号指定状況](http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html)
- kennyj [ハイフン付き電話番号に分割](https://qiita.com/mpyw/items/431c0c8cb70084a74be5)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Total

7

Last Release

2371d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/068eee7be2ce6caa6a52aff1e8b20e9d347fa62b0dfd6343d7292285770b10dc?d=identicon)[rebib](/maintainers/rebib)

---

Top Contributors

[![zhao-xinyou](https://avatars.githubusercontent.com/u/4452790?v=4)](https://github.com/zhao-xinyou "zhao-xinyou (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rebib-phonenumbersplitter/health.svg)

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

###  Alternatives

[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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