请帮助比较两个字符串并以百分比表示它们之间的差异
我有两个字符串,例如:
first string:
253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,253.0.0.0,247.0.0.24,197.0.0.35,189.0.0.98....
second string:
255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127,255.255.255.127....
$first_array = explode(",", $out_string);
$second_array = explode(",", $out_string_1);
$result_array = array_merge(array_diff($first_array, $second_array), array_diff($second_array, $first_array));
$result = implode(",",$result_array);
echo $result;