You are viewing a single comment's thread. Return to all comments →
PHP the best way to do it with Exceptions:
try{ intval($S) ? print($S) : throw new Exception('Bad String'); } catch (Exception $e) { print $e->getMessage(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 16: Exceptions - String to Integer
You are viewing a single comment's thread. Return to all comments →
PHP the best way to do it with Exceptions: