Create switch.php

PHP best practices. Try / Catch