From 2c6fb77bf6a1364f7715b4fdb1898d515d38dd50 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Wed, 16 Aug 2000 08:36:13 +0000 Subject: [PATCH] eval()'ed code may return a value in PHP4 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30351 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/misc.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/misc.xml b/functions/misc.xml index 65df18718c..41e8f8eefa 100644 --- a/functions/misc.xml +++ b/functions/misc.xml @@ -225,7 +225,7 @@ $file = fopen ($filename, 'r') Description - void eval + mixed eval string code_str @@ -248,6 +248,14 @@ $file = fopen ($filename, 'r') eval will retain these values in the main script afterwards. + + A return statement will terminate the evaluation of + the string immediatley. In PHP4 you may use return + to return a value that will become the result of the + eval function while in PHP3 + eval was of type void and did + never return anything. +