• 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

Get latest Tweets - What API

Minimum order amount except for specific shipping method in WooCommerce

How to loop sql table data inside a html table

Is there a way to use the same parameter into multiple place in the same query with Eloquent? [duplicate]

Transpose and flatten multiple rows of array data [duplicate]

if statement inside concatenation

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

PHP Imap , php 7.4.3 on mac osx catalina

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

browsersync doesn't work with XAMPP

file_put_content...fail to open stream:Permission denied in Laravel 5

Exact alternate to mcrypt_encrypt in PHP 7.2

MySQL order by field in Eloquent

str_replace or preg_replace random number from string

How to convert binary string to normal string in php

About Contact Privacy policy Terms and conditions