mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
3d39a99729
commit
933f6a47bc
1 changed files with 11 additions and 11 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue