The 5th Annual China PHP Conference

Voting

Please answer this simple SPAM challenge: eight plus one?
(Example: nine)

The Note You're Voting On

michael dot ochs at gmx dot net
9 years ago
Actually it isn't possible to do:
<?php
someFunction
() OR throw new Exception();
?>

This leads to a T_THROW Syntax Error. If you want to use this kind of exceptions, you can do the following:

<?php
function throwException($message = null,$code = null) {
    throw new
Exception($message,$code);
}

someFunction() OR throwException();
?>

<< Back to user notes page

To Top