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
This commit is contained in:
Hartmut Holzgraefe 2000-08-16 08:36:13 +00:00
parent 64c640e8bc
commit 2c6fb77bf6

View file

@ -225,7 +225,7 @@ $file = fopen ($filename, 'r')
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>eval</function></funcdef>
<funcdef>mixed <function>eval</function></funcdef>
<paramdef>string <parameter>code_str</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@ -248,6 +248,14 @@ $file = fopen ($filename, 'r')
<function>eval</function> will retain these values in the main
script afterwards.
</simpara>
<simpara>
A <literal>return</literal> statement will terminate the evaluation of
the string immediatley. In PHP4 you may use <literal>return</literal>
to return a value that will become the result of the
<function>eval</function> function while in PHP3
<function>eval</function> was of type <literal>void</literal> and did
never return anything.
</simpara>
<para>
<example>
<title>