|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-19 19:36 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Apr 02 16:00:01 2026 UTC |
Description: ------------ When you use an include() or eval() within a function, return() does not end execution of the function. Also __FUNCTION__ does not work within an include() or eval() within a function. Reproduce code: --------------- <?php function test(){ eval("echo __FUNCTION__;"); eval("return 123;"); return "abc"; } $x = test(); var_dump($x); ?> Expected result: ---------------- I would expect to see: test int(123) Actual result: -------------- output: string(3) "abc"