我的数据库中有字符串格式的公式存储。我只想计算通过成本值。
$cost = 5;
$formula = '{{cost}} * 1.5 + 3';
$formula = str_replace('{{cost}}', $cost, $formula);
翻过高山走不出你
相关分类