时间:2021-07-01 10:21:17 帮助过:21人阅读
$a = '3';$b = '4';$c = '+';$sum = $a.$c.$b;echo $sum, PHP_EOL;//可以这样echo eval("return $sum;"), PHP_EOL;//也可以这样$f = create_function('', "return $sum;");echo $f();3+4
$a = '3';$b = '4';$c = '+';$sum = $a.$c.$b;echo $sum, PHP_EOL;//可以这样echo eval("return $sum;"), PHP_EOL;//也可以这样$f = create_function('', "return $sum;");echo $f();3+4
拜托你抄仔细了
$f = create_function('', "return $sum;");echo $f();