If you are exactly reading the chapter on the format and string representation of UUIDs as defined by DCE, you cannot naively treat a UUID string as a hexadecimal string, see String Representing UUIDs (referred to by the Microsoft Developer Network ). That is, because the first three fields are presented at the big end (first of all, a significant figure).
, (, , ) , PHP 32bit, :
$bin = call_user_func_array('pack',
array_merge(array('VvvCCC6'),
array_map('hexdec',
array(substr($uuid, 0, 8),
substr($uuid, 9, 4), substr($uuid, 14, 4),
substr($uuid, 19, 2), substr($uuid, 21, 2))),
array_map('hexdec',
str_split(substr($uuid, 24, 12), 2))));
, , pack.
, , , , . pack.