eval: minor cleanups, add ob-capture tip

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64301 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
jim winstead 2001-12-08 23:27:41 +00:00
parent 3d39a99729
commit 933f6a47bc

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.60 $ -->
<!-- $Revision: 1.61 $ -->
<reference id="ref.misc">
<title>Miscellaneous functions</title>
<titleabbrev>Misc.</titleabbrev>
@ -292,11 +292,10 @@ if (defined("CONSTANT")){ // Note that it should be quoted
</simpara>
<simpara>
A <literal>return</literal> statement will terminate the evaluation of
the string immediatley. In PHP 4 you may use <literal>return</literal>
to return a value that will become the result of the
<function>eval</function> function while in PHP 3
<function>eval</function> was of type <literal>void</literal> and did
never return anything.
the string immediately. In PHP 4, <function>eval</function> returns
&false; unless <function>return</function> is called in the evaluated
code, in which case the value passed to <function>return</function> is
returned. In PHP 3, <function>eval</function> does not return a value.
</simpara>
<para>
<example>
@ -315,17 +314,18 @@ echo $str;
?>
]]>
</programlisting>
<para>
The above example will show:
<screen>
<para>
The above example will show:
<screen>
<![CDATA[
This is a $string with my $name in it.
This is a cup with my coffee in it.
]]>
</screen>
</para>
</screen>
</para>
</example>
</para>
&tip.ob-capture;
</refsect1>
</refentry>