Throwable

(PHP 7)

Giriş

Throwable PHP 7'de bir throw deyimi üzerinden yavrulanabilen Error ve Exception gibi nesneler için temel arayüzdür.

Bilginize:

PHP sınıfları doğrudan Throwable arayüzünden gerçeklenemez, bunun yerine Exception sınıfı genişletilerek gerçeklenir.

Arayüz Sözdizimi

Throwable {
/* Yöntemler */
abstract public getMessage ( void ) : string
abstract public getCode ( void ) : int
abstract public getFile ( void ) : string
abstract public getLine ( void ) : int
abstract public getTrace ( void ) : array
abstract public getTraceAsString ( void ) : string
abstract public getPrevious ( void ) : Throwable
abstract public __toString ( void ) : string
}

İçindekiler

add a note add a note

User Contributed Notes 1 note

up
52
mlocati at gmail dot com
2 years ago
I wrote a simple script that prints out the Throwable and Exception tree for every PHP version.

You can find this script here:
https://gist.github.com/mlocati/249f07b074a0de339d4d1ca980848e6a

And its output is here:
https://3v4l.org/sDMsv
To Top