#31736 [NEW]: E_PARSE on include() and include_once() stops execution
| From: | jakent at gmail dot com | Date: | Fri, 28 Jan 2005 07:26:18 +0000 |
| Subject: | #31736 [NEW]: E_PARSE on include() and include_once() stops execution | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-72965@lists.php.net to get a copy of this message | ||
From: jakent at gmail dot com
Operating system: Any
PHP version: 5.0.3
PHP Bug Type: Feature/Change Request
Bug description: E_PARSE on include() and include_once() stops execution
Description:
------------
It appears that bug #26814 caused a minor change in how include,
include_once, require, and require_once function.
In spirit of how include works versus require, I would like to see
execution continue on include and include_once E_PARSE errors.
It makes sense for require and require_once to stop script execution,
since failure causes a fatal error, while include and include_once only
issue a warning.
If nothing happens with this, the documentation needs to be changed. "Be
warned that parse error in required file doesn't cause processing
halting." is still present.
It would help a lot if include reflects the documented behavior once
again.
Jeff Kent
Reproduce code:
---------------
(file 1) test.php
<?php
@include "no_exist.php";
echo "Test1\n";
@include "e_parse.php";
echo "Test2\n";
?>
(file 2) e_parse.php
<?php
echo "Parse error\n
?>
Expected result:
----------------
Test1
Test2
Actual result:
--------------
Test1
--
Edit bug report at http://bugs.php.net/?id=31736&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31736&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31736&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31736&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31736&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31736&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31736&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31736&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31736&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31736&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31736&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31736&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31736&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31736&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31736&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31736&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31736&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31736&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31736&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31736&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31736&r=mysqlcfg