I want a solution something like: Imagine I have try catch
block, it works in any php 5.?.? version but with finally
block not in any. my code must be like this:
try {
// some logic
} catch (Exception $ex) {
// some logic
} finally {
// other logic
}
but, how can I make so that finally block worked only if php version supports it else ignore? For example:
try {
// some logic
} catch (Exception $ex) {
// some logic
}
#if version=5.?.?
finally {
// other logic
}
#endif
Is there any solution?