Kata kunci try
digunakan untuk membuat pernyataan try...catch
atau try...catch...finally
Contoh
Gunakan pernyataan try … catch untuk menangani exceptions:
<?php try { throw new Exception("ini exception"); } catch(Exception $e) { echo $e->getMessage(); } ?> // Output : ini exception