$value) { $item[$key] = $value; } } return $source; } public static function bcsub($leftOperand, $rightOperand, $scale = 2) { return \bcsub($leftOperand, $rightOperand, $scale); } public static function bcadd($leftOperand, $rightOperand, $scale = 2) { return \bcadd($leftOperand, $rightOperand, $scale); } public static function bcmul($leftOperand, $rightOperand, $scale = 2) { return \bcmul($leftOperand, $rightOperand, $scale); } public static function bcdiv($leftOperand, $rightOperand, $scale = 2) { return \bcdiv($leftOperand, $rightOperand, $scale); } public static function bccomp($leftOperand, $rightOperand, $scale = 2) { return \bccomp($leftOperand, $rightOperand, $scale); } public static function bcequal($leftOperand, $rightOperand, $scale = 2) { return self::bccomp($leftOperand, $rightOperand, $scale) === 0; } /** * 数组转义为json * @param array|\think\Collection $data * @return string */ public static function jsonEncode($data) { return json_encode($data, JSON_UNESCAPED_UNICODE); } /** * json转义为数组 * @param $json * @return array */ public static function jsonDecode($json) { return json_decode($json, true); } }