PHP Classes

File: demo/helloworld2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Thomas Björk  >  OBPipe  >  demo/helloworld2.php  >  Download  
File: demo/helloworld2.php
Role: Example script
Content type: text/plain
Description: A simple Hello, world! demo
Class: OBPipe
Manipulate PHP output with named pipe buffers
Author: By
Last change: Reordered the demos
Date: 4 years ago
Size: 430 bytes


Class file image Download

// Create a dynamic output handler
$pipe = new OBPipe();

// Activate the pipe called bravo

// Output some text
echo ", world!";

// Activate the pipe named alpha

// Output some text
echo "Hello";

// Reorder the output
$pipe->setNames(array('alpha', 'bravo'));

 * The expected output is:
 * "Hello, world!"