php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44148 Catch clause does not check for class existence
Submitted: 2008-02-18 12:19 UTC Modified: 2008-02-18 22:06 UTC
From: cool_lim_lp at yahoo dot com dot sg Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.5 OS: irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cool_lim_lp at yahoo dot com dot sg
New email:
PHP Version: OS:

 

 [2008-02-18 12:19 UTC] cool_lim_lp at yahoo dot com dot sg
Description:
------------
i don't know whether it is a bug or not. 
Look at the sample code given.

Reproduce code:
---------------
try
{
    throw new Exception('test');
}
catch (NonExistent $e)
{
   // the above class is non-existent but PHP doesn't give a warning or error
}
catch (Exception $e)
{
   // exception caught here
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-18 22:06 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That\'s a performance consideration, we don\'t have to do a class lookup nd don\'t need to trigger __autoload in that case.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 02 11:00:01 2025 UTC