I have two strings:
$string = shell_exec('reg.bat '.$arg); //returns word\0word\0word
$stringA = "$string";
$stringB = "word,other,word2,other2";
$array1 = explode('\0', $stringA);
$array2 = explode(',', $stringB);
$result = array_diff($array1, $array2);
I can use array_diff to find the differences, but the last word shows up as not in both strings even though it is because of the \0 delimiter.