PHP Conference Japan 2024

SimdJsonValueError 類別

(PECL simdjson >= 3.0.0)

簡介

當傳遞給 simdjson 函式的參數類型正確,但其值不正確時,會拋出 SimdJsonValueError。例如,當 JSON 解碼的 $depth 不是正數或 $depth 過大時。

類別概要

class SimdJsonValueError extends ValueError {
/* 繼承的屬性 */
protected 字串 $message = "";
private 字串 $string = "";
protected 整數 $code;
保護的 字串 $file = "";
保護的 整數 $line;
私有的 陣列 $trace = [];
私有的 ?Throwable $previous = null;
/* 繼承的方法 */
最終 公開的 Error::getMessage(): 字串
最終 公開的 Error::getPrevious(): ?Throwable
最終 公開的 Error::getCode(): 整數
最終 公開的 Error::getFile(): 字串
最終 公開的 Error::getLine(): 整數
最終 公開的 Error::getTrace(): 陣列
最終 公開的 Error::getTraceAsString(): 字串
私有的 Error::__clone():
}

更新日誌

版本 說明
PHP 8.0.0 SimdJsonValueError 現在繼承自 ValueError 而不是 Error
新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top