PHPackages                             polidog/brainf-ck - 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. [CLI &amp; Console](/categories/cli)
4. /
5. polidog/brainf-ck

ActiveLibrary[CLI &amp; Console](/categories/cli)

polidog/brainf-ck
=================

PHP Brainf\*ck Interpreter

0.0.1(13y ago)2141MITPHPPHP &gt;=5.4.1

Since Apr 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/polidog/Brainf-ck)[ Packagist](https://packagist.org/packages/polidog/brainf-ck)[ Docs](https://github.com/polidog/Brainf-ck)[ RSS](/packages/polidog-brainf-ck/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Brainf\*ckをPHPで実行しちゃうよ(・ω&lt;)
==============================

[](#brainfckをphpで実行しちゃうよω)

元々は池袋バイナリ勉強会に参加したときにつくってたんですが、
なんかjojo言語とかプログラミング言語KQとかいろいろと面白いものがあったので、
PHPで動かせたらたのしーなーなんて糞PHPer的な発想からPHPで動かすようにコード書いてみました的な感じだったりします。

動作環境
----

[](#動作環境)

php5.4以上
みなさん、php5.4使いましょうヽ(｀・ω・´)ﾉ ｳﾜｧｧﾝ!

動かし方 ( ﾟ∀ﾟ)
-----------

[](#動かし方--ﾟﾟ)

インストールとかとか

```
git@github.com:polidog/Brainf-ck.git

#composer無い方
curl -s http://getcomposer.org/installer | php

composer.phar install

```

これで準備完了。あとは実行するだけ！

```
php example/brainfuck.php bk/hello.bk

```

ジョジョ言語を動かす

```
php example/jojo.php jojo/hello.jojo

```

プログラミング言語KQを動かす

```
php example/kq.php kq/hello.qk

```

ニャルラトホテプ言語

```
php example/nyaruko.php nyaruko/hello.nc

```

ファイルを使わずに直接入力もできるお (｀・ω・´)ｼｬｷｰﾝ
-------------------------------

[](#ファイルを使わずに直接入力もできるお-ωｼｬｷｰﾝ)

ジョジョ言語で「H」一文字を出力する

```
php exmpale/jojo.php
オラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオラオララオラオラオラオララオラオラオラオラハーミットパープル

```

出力として以下のように表示されます

```
H

```

ほかの言語はもうめんどくさいので割愛します。

他の言語にだって変換できちゃう(:.oﾟзﾟo:.).:∵ぶっ
-------------------------------

[](#他の言語にだって変換できちゃうoﾟзﾟoぶっ)

```
php example/convert.php bf/hello.bf

```

実行結果はこんな感じ

```
ﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽ
ｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘｲｪｽﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ	ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ	ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧｼｴﾘｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ	ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘｲｪｽﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ	ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ
ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘｲｪｽﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧ	ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘｲｪｽﾀﾞｧｼｴﾘﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧ	ｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘﾀﾞｧｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘｼｴﾘﾀﾞｧｼｴﾘｲｪｽｼｴﾘｼｴﾘｲｪ	ｽｼｴﾘﾀﾞｧｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘｲｪｽｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｲｪｽｼｴﾘｼｴﾘｲｪ	ｽｼｴﾘｲｪｽﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧｼｴﾘｲｪｽｼｴﾘｼｴﾘｲｪｽｼｴﾘ
ﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧﾀﾞｧｼｴﾘﾀﾞｧ

(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!	(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／に	ゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!	CHAOS☆CHAOS!
(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!Let's＼(・ω・)／にゃー(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!CHAOS☆CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!
(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃーLet's＼(・ω・)／にゃー(」・ω・)」うー!	(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃー
CHAOS☆CHAOS!(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!CHAOS☆CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!
(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!Let's＼(・ω・)／にゃー(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!
(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!CHAOS☆CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!Let's＼(・ω・)／にゃー(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!CHAOS☆CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!Let's＼(・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!Let's＼(・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!
(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!(」・ω・)」うー!!!(／・ω・)／にゃー!!!Let's＼(・ω・)／にゃーCHAOS☆CHAOS!(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!CHAOS☆CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー(／・ω・)／にゃー(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!(」・ω・)」うー!!(／・ω・)／にゃー!!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃーCHAOS☆CHAOS!(」・ω・)」うー!!!(／・ω・)／にゃー!!!I WANNA CHAOS!
(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!(」・ω・)」うー!(／・ω・)／にゃー!Let's＼(・ω・)／にゃー

```

もちろんジョジョ言語からニャルラトホテプ言語にだって変換できます

```
php example/convert2.php jojo/hello.jojo

```

けものフレンズだって対応したよ！
----------------

[](#けものフレンズだって対応したよ)

```
php example/kemono.php kemono/hello.kemono
```

hello wrold的なものとか仕様とかを以下のサイトから参考させていただきました。感謝です。
------------------------------------------------

[](#hello-wrold的なものとか仕様とかを以下のサイトから参考させていただきました感謝です)

[http://kissaten-no-heya.blogspot.jp/2012/04/blog-post\_8719.html](http://kissaten-no-heya.blogspot.jp/2012/04/blog-post_8719.html)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

4771d ago

### Community

Maintainers

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

---

Top Contributors

[![polidog](https://avatars.githubusercontent.com/u/284778?v=4)](https://github.com/polidog "polidog (15 commits)")

---

Tags

cliconsole

### Embed Badge

![Health badge](/badges/polidog-brainf-ck/health.svg)

```
[![Health](https://phpackages.com/badges/polidog-brainf-ck/health.svg)](https://phpackages.com/packages/polidog-brainf-ck)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B11.2k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.4k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k239.8M282](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68325.0M364](/packages/wp-cli-php-cli-tools)[php-school/cli-menu

A command line menu helper in PHP

2.0k1.1M27](/packages/php-school-cli-menu)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)

PHPackages © 2026

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