PHP Classes

File: bf.test.php

Recommend this page to a friend!
  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: 18 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();

?>