0

在 PHP 中检查 2 个 uuid 是否相等的正确方法是什么?我需要检查 2 个具有 uuid 值的变量并根据结果采取行动。我尝试了 strcmp() 但没有产生正确的值。

谢谢!米兹

4

1 回答 1

5

strcmp() works fine for comparing strings. If you claim otherwise, you would need to provide a self contained fully running code sample to prove it. My point is, you've made a mistake elsewhere.

Personally, I would just use the strict (===) comparison operator though

if ($a === $b)
于 2012-10-20T01:46:04.903 回答