共用方式為


base64_decode_toguid()

將 base64 字串解碼成 GUID

語法

base64_decode_toguid(base64_string)

深入瞭解 語法慣例

參數

名稱 類型 必要 Description
base64_string string ✔️ 要從base64譯碼為 GUID 的值。

傳回

傳回從 base64 字串解碼的 GUID

範例

print Quine = base64_decode_toguid("JpbpECu8dUy7Pv5gbeJXAA==")  

輸出

Quine
10e99626-bc2b-754c-bb3e-fe606de25700

如果您嘗試解碼無效的 base64 字串,將會傳回 "null":

print Empty = base64_decode_toguid("abcd1231")

若要將 GUID 編碼為 base64 字串,請參閱 base64_encode_fromguid ()