Since this was removed in PHP7. You can achieve the same output with the following code.
function convertBinToMSSQLGuid($binguid)
{
$unpacked = unpack('Va/v2b/n2c/Nd', $binguid);
return sprintf('%08X-%04X-%04X-%04X-%04X%08X', $unpacked['a'], $unpacked['b1'], $unpacked['b2'], $unpacked['c1'], $unpacked['c2'], $unpacked['d']);
}
Enjoy.