- rand: documentation ( source)
<?php
echo rand();die();
class ExceptionX extends Exception { }
class ExceptionY extends Exception { }
class ExceptionZ extends Exception { }
function t() { throw new ExceptionZ(); }
try {
t();
} catch (Exception $e) {
switch(get_class($e)) {
case 'ExceptionX': /** fall through */
case 'ExceptionY': /** fall through */
/* handle the ones we want here */
break;
default:
throw $e;
}
}