• 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

php echo remove slashes from url [duplicate]

woocommerce get_order_report_data to show order_item_id

Refresh specific HTML content that retrieves data from MySQL

Image upload not working through ajax Laravel

What is PHP's equivalent of JavaScript's "array.every()"?

generating a random code in php?

Laravel post contact form giving me error 419

Group rows by column and sum another column within groups [duplicate]

PHP sort array of objects by two properties

Add bold text and line break into Laravel Notification Email

Laravel lang slug in url

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

How to update array value in Laravel

Live search query using JS and PHP for QA forum

About Contact Privacy policy Terms and conditions