Beispiel #1
0
} else {
    echo "Failure...\n";
}
echo "Iteration -- \n";
try {
    foreach ($testRestrictedSet->iterate() as $setValue) {
        echo "    \$setValue - {$setValue}\n";
    }
} catch (\Exception $e) {
    echo "EXCEPTION CAUGHT\n";
}
echo "Hashing -> ";
$success = true;
$hash = $hash2 = null;
try {
    $hash = $testRestrictedSet->hash();
    $testRestrictedSet->add(7);
    $hash2 = $testRestrictedSet->hash();
} catch (\Exception $e) {
    $success = false;
}
if ($success) {
    echo "Success! ({$hash}, {$hash2})\n";
} else {
    echo "Failure...";
}
class testClass
{
    public $publicProp;
}
$obj = new testClass();