php中规范uuid表示的16字节二进制形式 [英] 16 bytes binary form of canonical uuid representation in php
本文介绍了php中规范uuid表示的16字节二进制形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从字符串/规范表示中获得 16 字节二进制形式的 uuid:
how can I get 16 bytes binary form of the uuid from its string/canonical representation:
例如:1968ec4a-2a73-11df-9aca-00012e27a270
干杯,/马辛
推荐答案
$bin = pack("h*", str_replace('-', '', $guid));
这篇关于php中规范uuid表示的16字节二进制形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文