<?php
class test
{
function setSomeProp($s) { $this->prop = $s;}
function getSomeProp() { return $this->prop;}
}
$a = new test();
//$b = &$a;
//$b = unserialize(serialize($a));
$b = clone $a;
$b->setSomeProp('test');
$a->setSomeProp('failed');
echo $b->getSomeProp(); //returns 'test'
echo "\n";
echo $a->getSomeProp(); //returns 'test'