Beispiel #1
0
<?php

chdir(__DIR__);
require_once './BrainDog.php';
$dog = new BrainDog();
$dog->bow(file_get_contents('./bd-data.txt'));
Beispiel #2
0
>-.
<+++.
>>++++++[<<++++>>-]<<++.
>-----.
>--------[<<-------->>+]<<++.
>>++++[<<+++++>>-]<<.
>.
>++++[<<----->>-]<<.
+++.
>.
<---.
>>++++[<<+++++>>-]<<--.
>.
>++++[<<----->>-]<<++.
+++++.
[-]+++++[>>++++++<<-]>>+++.
<<+++++[>>----<<-]>>---.
EOS;
$tmp = str_replace("\n", '', $code);
$code = '';
$p1 = 0;
$p2 = mt_rand(1, 20);
while ($p1 < strlen($tmp)) {
    $code .= substr($tmp, $p1, $p2) . "\n";
    $p1 += $p2;
    $p2 = mt_rand(1, 20);
}
$dog = new BrainDog();
$string = $dog->encode($code);
echo $string, "\n";
//$dog->bow($string);