reference/misc/functions/eval.xml
68308f0095c6ebf0d19afa72f2bac0a9f194e77d
...
...
@@ -15,6 +15,16 @@
15
15
<para>
16
16
Evaluates the given <parameter>code</parameter> as PHP.
17
17
</para>
18
+
<para>
19
+
The code being evaluated inherits the
20
+
<link linkend="language.variables.scope">variable scope</link>
21
+
of the line on which the <function>eval</function> call occurs.
22
+
Any variables available at that line will be available for reading and
23
+
modification in the evaluated code.
24
+
However, all functions and classes defined will be defined in the global namespace.
25
+
In other words, the compiler considers the evaluated code as if it were a
26
+
separate <link linkend="function.include">included</link> file.
27
+
</para>
18
28
<caution>
19
29
<para>
20
30
The <function>eval</function> language construct is <emphasis>very dangerous</emphasis>
21
31