Re: cvs: phpdoc /en/reference/misc/functions eval.xml

From: Date: Wed, 24 May 2006 12:51:50 +0000
Subject: Re: cvs: phpdoc /en/reference/misc/functions eval.xml
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373101@lists.php.net to get a copy of this message
Hi, Seriously ? I translate that and I'm really wondering the truth about that... Is it like $code_str = '?><?php echo 'something'; ?>'; Or I'm just wrong and don't understand what you said ? It makes no sense for me to do that... Maybe it's good or just need a little rewording. "you can prepend code_str *to* a closing tag" ? Jean-Sébastien Goupil jsgoupil@gmail.com http://other.lookstrike.com Oliver Albers a écrit :
simp Wed May 24 10:47:16 2006 UTC
  Modified files:                  /phpdoc/en/reference/misc/functions	eval.xml   Log:
Added some words about how to mix HTML and PHP code within eval http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/misc/functions/eval.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/misc/functions/eval.xml diff -u phpdoc/en/reference/misc/functions/eval.xml:1.13 phpdoc/en/reference/misc/functions/eval.xml:1.14 --- phpdoc/en/reference/misc/functions/eval.xml:1.13 Fri Mar 11 16:11:51 2005 +++ phpdoc/en/reference/misc/functions/eval.xml Wed May 24 10:47:16 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.58 --> <refentry id="function.eval">
    <refnamediv>
@@ -16,7 +16,11 @@
      <function>eval</function> evaluates the string given in
      <parameter>code_str</parameter> as PHP code. Among other things,
      this can be useful for storing code in a database text field for
-     later execution.
+     later execution. <parameter>code_str</parameter> does not have to
+     start with or contain <link linkend="language.basic-syntax.phpmode">
+     PHP Opening tags</link>. If you want your given string to be +     evaluated like regular PHP code with opening tags you can prepend
+     <parameter>code_str</parameter> with a closing tag.
     </simpara>
     <simpara>
      There are some factors to keep in mind when using


« previous php.doc (#969373101) next »