#31542 [Opn->Csd]: eval() terminates PHP on fatal error instead of returning false

From: Date: Mon, 24 Jan 2005 13:16:11 +0000
Subject: #31542 [Opn->Csd]: eval() terminates PHP on fatal error instead of returning false
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969366145@lists.php.net to get a copy of this message
ID: 31542 Updated by: vrana@php.net Reported By: jcmailtrap-php at yahoo dot ca -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: RHEL3 PHP Version: 5.0.3 New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "In case of a fatal error in the evaluated code, the whole script exits." Previous Comments: ------------------------------------------------------------------------ [2005-01-17 09:46:35] vrana@php.net Derick, why you reopened this bug? What next should be documented? ------------------------------------------------------------------------ [2005-01-17 08:24:29] derick@php.net Jani, you're wrong. Eval is supposed not to throw a fatal error when the script passed to it is wrong. In case of a parse-error it does return false, and does not abort the script, where it normally would abort the script (with required that is). For things like calling an not existing method it will of course throw a fatal error. ------------------------------------------------------------------------ [2005-01-14 17:02:57] vrana@php.net This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Changed to: "In case of a parse error in the evaluated code, eval() returns FALSE." ------------------------------------------------------------------------ [2005-01-14 05:39:05] sniper@php.net So the one who wrote the manual page made a mistake since eval() isn't some magic thing that can override fatal errors.. ------------------------------------------------------------------------ [2005-01-14 05:31:46] jcmailtrap-php at yahoo dot ca Well, in eval()'s manual page, it is stated: In case of a fatal error in the evaluated code, eval() returns FALSE. Obviously eval() did not return FALSE in this case because the script exited. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31542 -- Edit this bug report at http://bugs.php.net/?id=31542&edit=1

« previous php.doc (#969366145) next »