Home >Backend Development >PHP Tutorial >请问php有没有将字符串当做公式处理数据的功能?

请问php有没有将字符串当做公式处理数据的功能?

WBOY
WBOYOriginal
2016-06-23 13:43:11719browse

不如$a=100;
$b="$c=$a-20";
怎样处理一下就可以得到80?


回复讨论(解决方案)

$a=100;eval("\$b=\$c=$a-20;");echo $b; //80

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn