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

WBOY
Release: 2016-06-13 12:12:01
Original
995 people have browsed it

请问php有没有将字符串当做公式处理数据的功能?
不如$a=100;
$b="$c=$a-20";
怎样处理一下就可以得到80?

------解决思路----------------------

<br />$a=100;<br />eval("\$b=\$c=$a-20;");<br />echo $b; //80<br />
Copy after login

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template