PHPKonf Istanbul PHP Conference 2019 - Call for Papers


Please answer this simple SPAM challenge: two minus two?
(Example: nine)

The Note You're Voting On

jim at anderos dot com
5 years ago
If you are using a namespace, you must indicate the global namespace when using Exceptions.
namespace alpha;
    throw new \
Exception("Something is wrong!");
// throw new Exception(""); will fail

try {
} catch( \
Exception $e ) {
// catch( Exception $e ) will give no warning, but will not catch Exception
echo "ERROR: $e";


<< Back to user notes page

To Top