PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Joshua hatfield   floIncrementor   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample Usage File
Class: floIncrementor
Add two numbers together with undo ability
Author: By
Last change:
Date: 18 years ago
Size: 900 bytes
 

Contents

Class file image Download
<?
include("floIncrementor.php");
$inc = new floIncrementor();
?>
<html>
<head>
    <title>Test floIncrementor</title>
</head>
<body>
Increment 20 by 11 => <?
echo('$inc->increment(20, 11, "Comment: Incrementing 20 by 11 with a precision of .0001, accepting results between 0 and 100.", .0001, 0, 100): ');
echo(
$inc->increment(20, 11, "Comment: Incrementing 20 by 11 with a precision of .0001, accepting results between 0 and 100.", .0001, 0, 100));
?>
<pre>
inc = <?
print_r
($inc);
?>
</pre>
5 more => <?
echo('$inc->increment(NULL, 5, "Adding 5 more."): ');
echo(
$inc->increment(NULL, 5, "Adding 5 more."));
?>
<pre>
inc = <?
print_r
($inc);
?>
</pre>
undo => <?
echo('$inc->undo(): ');
echo(
$inc->undo());
?>
<pre>
inc = <?
print_r
($inc);
?>
redo => <?
echo('$inc->redo(): ');
echo(
$inc->redo());
?>
<pre>
inc = <?
print_r
($inc);
?>
</pre>
</body>
</html>