php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27666 Exception behavior seems to be broken
Submitted: 2004-03-23 23:46 UTC Modified: 2005-01-22 01:00 UTC
Votes:15
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: andrey at itime dot ru Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5CVS-2004-04-07 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
3 + 31 = ?
Subscribe to this entry?

 
 [2004-03-23 23:46 UTC] andrey at itime dot ru
Description:
------------
Two files.
1.php5:
<?
print 'x';
require_once('2.php5');
print 'y';
die('z');
?>

2.php5:
<?
print '1';
throw new Exception('Help me!');
print '2';
?>

After run 1.php5, I expect to see: "x1" printed and uncaughted exception report. But I see "x1yz" printed and no exception report. 

It seems that php just continue execution after returning from require_once(). Even if I surround require_once() by try {} catch block, it still print "x1yz" and die.

Reproduce code:
---------------
 

Expected result:
----------------
 

Actual result:
--------------
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-15 00:31 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Seems to be fixed long time ago.
 [2005-01-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC