Eval
(unknown)
Eval---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Find the value of the string PHP code
Syntax: Mixed eval (string code_str)
Description:
Eval () Code_str the value of the PHP code with the string parameter, which can be used to store the code in the database text field for subsequent programs.
When using eval (), some elements must remember that the arguments passed to the function must be valid PHP code, including the semicolon (;) of the program termination description, so that no error occurs and the appropriate escape from the parameter code_str.
The value of the variable given in eval () will retain the values in later programs.
The description of return will immediately terminate the evaluation of the string, in PHP4, you can return a value by using returns, which will be the result of Eval (), and it will not return anything in PHP3.
Example:
<?php
$string = ' Cup ';
$name = ' coffee ';
$str = ' is a $string with my $name in it.<br> ';
Echo $str; Eval ("\ $str = \" $str \; ");
Echo $str;
?>
The example above will show:
This are $string with my $name in it.
This is the cup with my coffee in it.