PHPackages                             yrizos/brainfart - 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. yrizos/brainfart

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

yrizos/brainfart
================

An over-engineered Brainfuck interpreter.

0.2.0(7y ago)813MITPHPPHP &gt;=7.2

Since Mar 10Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (6)Used By (0)

Brainfart [![Build Status](https://camo.githubusercontent.com/a7c3dc2d79d2fbf77d41b0e0ae626fe3c392108f8cbb96c6a1817e9037ca14bf/68747470733a2f2f7472617669732d63692e6f72672f7972697a6f732f627261696e666172742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yrizos/brainfart)
=========================================================================================================================================================================================================================================================================================

[](#brainfart-)

Brainfart is [Brainfuck interpreter](http://esolangs.org/wiki/Brainfuck), in PHP.

Try it out:

```
./bin/brainfart ./tests/scripts/sort.bf "100 5 99 200"

```

Syntax
------

[](#syntax)

**Memory operations**

- `>` Moves the memory pointer to the right.
- `mf5++>mf5mf5>+++>+.:mf5+++++;:mb3---;

```

Will output: `Hello World!\n` (hopefully)

**Interpreter instructions**

`!!` separates input from commands. If present, whatever is left of it will be interpreted as comma separated input.

```
5,10,15,20!!>>,[>>,]]+]
