• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Why isn't my PHP exception working?

phpexception-handling


PHP Snippet 1:

<?php

namespace Foo\Bar;

try {
   // ...
} catch (Exception $e) { // This is trying to catch Foo/Bar/Exception
   // ...
}

PHP Snippet 2:

try {
    // ...
} catch (\Exception $e) {
    // ...
}

Related Snippets

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

LARAVEL: How to fetch id dynamically in a query builder?

I need to link Google Sheet with my Laravel

codeigniter 4 running error first time with xampp

PHP: Telegram Bot: Insert line break to text message

str_word_count() function doesn't display Arabic language properly

Phpunit partial mock + proxy Entity

how to get value from array in laravel

How to update array value in Laravel

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Transform array, set each array element with parent key php

Laravel Delete and Update

Laravel Excel::store file empty after stored

getting error while enter Command => php artisan route:list

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

About Contact Privacy policy Terms and conditions