php[tek] 2018 : Call for Speakers

Voting

Please answer this simple SPAM challenge: max(three, nine)?
(Example: nine)

The Note You're Voting On

zmunoz at gmail dot com
7 years ago
When catching an exception inside a namespace it is important that you escape to the global space:

<?php
namespace SomeNamespace;

class
SomeClass {

  function
SomeFunction() {
   try {
    throw new
Exception('Some Error Message');
   } catch (\
Exception $e) {
   
var_dump($e->getMessage());
   }
  }

}
?>

<< Back to user notes page

To Top