PHP 8.6.0 Beta 1 is available for testing

Throwable::getCode

(PHP 7, PHP 8)

Throwable::getCodeObtener el código de la excepción

Descripción

public function Throwable::getCode(): int

Devuelve el código de error asociado al objeto lanzado.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Devuelve el código de la excepción como un int en Exception , aunque posiblemente como otro tipo en los descendientes de Exception (por ejemplo, como string en PDOException ).

Véase también

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /