igorw / brainfuck-php

Brainfuck implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brainfuck-php

brainfuck

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

About

Brainfuck implementation.

License:MIT License


Languages

Language:PHP 100.0%