You may use undocumented and invisible property $e->faultcode to access string version of $code. Because standard $e->getCode() does not work:
<?php
$e = new SoapFault("test", "msg");
var_dump($e->getCode()); // prints "0"
var_dump($e->faultcode); // prints "test"
?>
Also you may use namespaced fault codes:
<?php
$e = new SoapFault(array("namespace", "test"), "msg");
?>
- see ext/soap/soap.php, PHP_METHOD(SoapFault, SoapFault). To access the namespace, use $e->faultcodens