PHP9 ArithmeticError

2023-08-21 13:49 更新

(PHP 7, PHP 8)

簡(jiǎn)介

當(dāng)執(zhí)行數(shù)學(xué)運(yùn)算發(fā)生錯(cuò)誤時(shí)拋出 ArithmeticError 。 這些錯(cuò)誤包括嘗試執(zhí)行負(fù)數(shù)的位移,以及對(duì)任何可能會(huì)導(dǎo)致值超出 int 的范圍 intdiv() 調(diào)用。

類(lèi)摘要

class ArithmeticError extends Error {
/* 繼承的屬性 */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* 繼承的方法 */
public Error::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public Error::getMessage(): string
final public Error::getPrevious(): ?Throwable
final public Error::getCode(): int
final public Error::getFile(): string
final public Error::getLine(): int
final public Error::getTrace(): array
final public Error::getTraceAsString(): string
public Error::__toString(): string
private Error::__clone(): void
}


以上內(nèi)容是否對(duì)您有幫助:
在線(xiàn)筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)