brainfuck-php

Brainfuck implementation.

MIT License

Downloads
9
Stars
8
Committers
2

brainfuck-php

Brainfuck is a turing complete language with 8 instructions.

Example

Hello World:

>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.>>>++++++++[<++++>-]
<.>>>++++++++++[<+++++++++>-]<---.<<<<.+++.------.--------.>>+.

Cat:

,[.,]

Usage

Just pass a filename to the interpreter:

$ bin/brainfuck examples/hello.b

You can also run the debug command to get a log of all instructions.

$ bin/brainfuck debug examples/hello.b

References