Login   Register  
PHP Classes
elePHPant
Icontem

File: bf.test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Reitsma  >  Brainf*** Interpreter  >  bf.test.php  >  Download  
File: bf.test.php
Role: Example script
Content type: text/plain
Description: Usage example
Class: Brainf*** Interpreter
Brainf*** language interpreter
Author: By
Last change: Since the execute() function doesn't echo the results anymore, added an echo before calling the execute() function.
Date: 8 years ago
Size: 220 bytes
 

Contents

Class file image Download
<?php

/**
 * Brainf*ck example usage.
 */

require("bf.class.php");

// Create a new bf object
$bf = new bf();

// Load helloworld.b
$bf->load("helloworld.b");

// Start parsing
echo $bf->execute();

?>