|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-14 05:19 UTC] jed@php.net
[2005-01-14 05:26 UTC] sniper@php.net
[2005-01-14 05:31 UTC] jcmailtrap-php at yahoo dot ca
[2005-01-14 05:39 UTC] sniper@php.net
[2005-01-14 17:02 UTC] vrana@php.net
[2005-01-17 08:24 UTC] derick@php.net
[2005-01-17 09:46 UTC] vrana@php.net
[2005-01-24 14:16 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 11:00:01 2025 UTC |
Description: ------------ When a fatal error is caused by attempting to call a method on an non-object or non-existing variable, eval() throws a fatal error which terminates the script instead of returning false as stated in the doc. Reproduce code: --------------- $result = eval('$nosuchobject->method();'); echo "done eval\n"; if ($result===false) { echo "error correctly returned\n"; } Expected result: ---------------- Notice: Undefined variable: nosuchobject Fatal error: Call to a member function method() on a non-object done eval error correctly returned Actual result: -------------- Notice: Undefined variable: nosuchobject Fatal error: Call to a member function method() on a non-object