ID: 33062
Updated by: [EMAIL PROTECTED]
Reported By: vdlaag at natlab dot research dot philips dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: n.a.
PHP Version: Irrelevant
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
Dup of bug #31736.
Previous Comments:
------------------------------------------------------------------------
[2005-05-19 09:43:28] vdlaag at natlab dot research dot philips dot com
Description:
------------
When I try to include a file with a parse error. PHP stops execution at
the parse error.
However, the online manual for include states the following:
"Be warned that parse error in required file doesn't cause processing
halting."
I am using Zend Studio 4 to write my PHP scripts. And when I debug the
page the debugger picks up the parse error, but execution continues.
And then I get the desired output.
I found bug #28330 in the bug database describing the same problem. The
conclusion was that it was not a bug. But the behaviour contradicts the
manual.
Reproduce code:
---------------
<?php
class Try
{
private $old_track_errors;
public function __construct()
{
$this->old_track_errors = ini_get('track_errors');
}
public function requireWithError($file)
{
ini_set('track_errors', true);
echo "So far so good";
include($file);
echo "This message is not shown";
$error = isset($php_errormsg) ? $php_errormsg : false;
ini_set('track_errors', $this->old_track_errors);
return $error;
}
}
$test = new Try();
$test->requireWithError('fileWithParseError.php');
?>
This is 'fileWithParseError.php'.
<?php
class TestCaseWithParseError
{
wibble
}
?>
Expected result:
----------------
I expect to see the message "So far so good", then the parse error, and
then the message "This message is not shown".
Actual result:
--------------
I just see the message "So far so good", then the parse error. The
message "This message is not shown" is indeed not shown
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33062&edit=1