Arrays values not identical (but they are?)

前端 未结 3 2616
鱼传尺愫
鱼传尺愫 2021-02-20 17:47

I have two arrays. They seem to contain at least one identical set of values, but performing array_diff() does not return anything even though I think it should!

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-20 18:07

    There is probably a character that is non-printable.

    Write out both strings into a file, from PHP, in binary format, and compare the results with a hex editor or similar. Just copying the strings and then comparing will not do for some cases as it might lose characters.

提交回复
热议问题