Answers for "php try statement"

PHP
5

php try catch

<?php

function test() {
    try {
        throw new Exception('foo');
    } catch (Exception $e) {
        return 'catch';
    } finally {
        return 'finally';
    }
}

echo test();
?>
Posted by: Guest on January-13-2021

Browse Popular Code Answers by Language