コード例 #1
0
ファイル: reverse.php プロジェクト: nbartels/php-brainfuck
<?php

include "../brainfuck.php";

$interpreter = new Brainfuck();
$interpreter->setSource("+[>,]<-[+.<-]");
$interpreter->setInput("Was it a car or a cat I saw?");

echo $interpreter->execute()->getOutput();
?>
コード例 #2
0
ファイル: prime.php プロジェクト: nbartels/php-brainfuck
  ]
 
  >++++[<++++++++>-]<.[-]
 
  ===================================================================
  =========================== END FOR ===============================
  ===================================================================


  >>>>>>>
 ]
 <<<<<<<<



 >[-]<
  [-]
 <<-
]
 
======LF========
 
++++++++++.[-]
@

");
$interpreter->setInput("10" . chr(10));

echo $interpreter->execute()->getOutput();

?>
コード例 #3
0
ファイル: echo.php プロジェクト: nbartels/php-brainfuck
<?php

include "../brainfuck.php";

$interpreter = new Brainfuck();
$interpreter->setSource(">+[>,]<[<]>>[.>]");
$interpreter->setInput("Hi, how are you?");

echo $interpreter->execute()->getOutput();

?>