dotzero / brainfuck
A PHP implementation of interpreter for Brainfuck
Installs: 58
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 1
pkg:composer/dotzero/brainfuck
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is auto-updated.
Last update: 2022-06-04 08:42:42 UTC
README
This is PHP implementation of interpreter for Brainfuck.
The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use.
Usage
$code = <<<EOT ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++ .>+.+++++++..+++.>++.<<+++++++++++++++.>.+++. ------.--------.>+.>. EOT; $bf = new Brainfuck($code); $bf->run();
Install
Via composer:
$ composer require dotzero/brainfuck
Without composer
Clone the project using:
$ git clone https://github.com/dotzero/brainfuck-php
and include the source file with:
require_once("brainfuck-php/src/Brainfuck.php");
Test
First install the dependencies, and after you can run:
$ vendor/bin/phpunit
License
Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php