- var_dump: documentation ( source)
- preg_replace: documentation ( source)
<?php
$pattern = array("/cash-equivalents_quarterly/" , "/total-assets_quarterly/");
$replace_data["cash-equivalents_quarterly"] = 169677928570;
$replace_data["total-assets_quarterly"] = 222617965672000000000;
$formula["1"] = " cash-equivalents_quarterly / total-assets_quarterly";
$amount1 = preg_replace($pattern,$replace_data,$formula["1"]);
var_dump($amount1);