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