#!/usr/local/bin/php
<?

require "phpos/phpos.php";

class TestObj {

	var $counterValue;
	function incrementCounter () { return (++$this->counterValue); }
	function getUname() { return (php_uname()); }

}

echo "PHP Object Store Test\n\n";

$a = new PHPOS_Bind("PHPOS.TestObj");
$b = new TestObj;

$rc = $a->incrementCounter();
$lc = $b->incrementCounter();

echo "Remote counter = $rc\n";
echo "Local counter  = $lc\n";
echo "\n";

$ru = $a->getUname();
$lu = $b->getUname();

echo "Remote uname = $ru\n";
echo "Local uname  = $lu\n";

echo "\n";

$start=time();

//for ($c=0;$c<=10000;$c++) $a->incrementCounter();

$stop=time();

//echo "Total time for 10000 calls : ".($stop-$start)."\n";

?>
