While this class protects against accidental echo and/or var_dump, it does NOT protect against some other php functions:
<?php
$value = new SensitiveParameterValue('MyPassword');
var_dump($value); // Safe
echo $value; // PHP error: could not be converted to string
var_dump(get_mangled_object_vars($value)); // Password exposed!!!
?>