定制 fedcomp/brainloller 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fedcomp/brainloller

最新稳定版本:0.1

Composer 安装命令:

composer require fedcomp/brainloller

包简介

class to decode brainloller images

README 文档

README

Brainloller is a Brainfuck clone designed by Lode Vandevenne in 2005. Commands are read from the pixels of a .png image, with 2 extra commands. The extra commands change the instruction pointer direction so that you can compact the 1D Brainfuck code into a 2D image. More info

Brainloller class uses https://github.com/deralex/phprainfuck as dev-depedency, allowing you to evaluate brainloller code.

How to use

using Composer add requirement to your composer.json file

{
	"require":{
		"fedcomp/brainloller": "0.0.1"
	}
}

or run from console composer require fedcomp/brainloller

Then a bit of code and you are done

<?php require_once __DIR__.'/vendor/autoload.php';

use Fedcomp\BrainLoller;
$brainloller = new BrainLoller();

$brainloller->init(__DIR__.'/tests/images/hello-world.png');
// OR
$brainloller->init(fopen(__DIR__.'/tests/images/hello-world.png', 'r'));
echo $brainloller->getCode();

Method init() accept file paths, file handles (fopen()), and gd handles (not tested).

Open example.php for more details.

统计信息

  • 总下载量: 46
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-23