Is there something similar in PHP to the try ... else in Python?
try ... else
I need to know if the try block executed correctly as when the block executed correctly
PHP does not have try/catch/else. You could however set a variable in the catch block that can be used to determine if it was run:
$caught = false; try { // something } catch (Exception $e) { $caught = true; } if (!$caught) { }