Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#33062 [Opn->Bgs]: include kills script after parse error
ID:               33062
Updated by:       vrana@php.net
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

Report this thread to moderator Post Follow-up to this message
Old Post
vrana@php.net
05-19-05 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:10 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.