php函数中的 eval() 与create_function()

编程语言
0 137

csroad
csroad 举报
2019-04-27

$url ="a";

$urlrule = "b";

eval("\$url = \"$urlrule\";");

echo $url;



===================

$a=10;

$b=9;

$func1 = create_function('$a,$b', 'return ($a=$b);');

echo $func1($a,$b);