For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2005 > #31542 [Opn]: eval() terminates PHP on fatal error instead of returning false









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #31542 [Opn]: eval() terminates PHP on fatal error instead of returning false
vrana@php.net

2005-01-17, 8:55 am

ID: 31542
Updated by: vrana@php.net
Reported By: jcmailtrap-php at yahoo dot ca
Status: Open
Bug Type: Documentation problem
Operating System: RHEL3
PHP Version: 5.0.3
New Comment:

Derick, why you reopened this bug? What next should be documented?


Previous Comments:
------------------------------------------------------------------------

[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.

------------------------------------------------------------------------

[2005-01-14 05:26:58] sniper@php.net

Fatal errors are...tadaa..FATAL! As such -> exit.
No bug here.


------------------------------------------------------------------------

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com