|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-24 02:35 UTC] felipe@php.net
-Status: Open
+Status: Feedback
[2010-08-24 02:35 UTC] felipe@php.net
[2010-08-24 10:30 UTC] wolff dot schetula at gmail dot com
[2010-08-24 11:16 UTC] aharvey@php.net
-Status: Feedback
+Status: Bogus
[2010-08-24 11:16 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 13:00:02 2025 UTC |
Description: ------------ The code below shows the problem. Any return statement inside the function that is supposed to create the code to be evaluated will crash PHP. Not even Apache will send a header anymore. A white page appears. If the returned string is stored i a variable first it will work fine. The quickest fix is a (string) cast inside the eval function. eval((string)foo()); Test script: --------------- function foo() { return 'echo time();'; } eval(foo());