't Bijstere spoor

't Bijstere spoor

A blog about Web development

PHP feature request: 'Throwable' interface

I would love to have a 'Throwable' inteface in PHP, so I opened my very first feature request.

I realize this is mostly an OOP purist request, as it won't provide any real functionality.

If you agree, vote!


PHP try..catch syntax weirdness

I just noticed today that the try..catch block requires the use of curly braces, e.g.:

<?php

  
try {

    throw new 
Exception('unox');

  } catch (
Exception $e) echo $e->getMessage();

?>

..won't work. I wonder why..