3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { throw new \SoapFault('test-fault-code', 'fault message'); } catch (\SoapFault $e) { echo $e->faultcode, ' ', $e->getCode(), PHP_EOL; }
based on sFjEP
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'SoapFault' not found in /in/uYVc9:4 Stack trace: #0 {main} thrown in /in/uYVc9 on line 4
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'SoapFault' not found in /in/uYVc9 on line 4
Process exited with code 255.
Output for 5.3.18 - 5.3.29
test-fault-code 0