PHP 8.3.4 Released!

Exception::getLine

(PHP 5, PHP 7, PHP 8)

Exception::getLineİstisnanın oluştuğu satırın numarası ile döner

Açıklama

final public Exception::getLine(): int

İstisnanın oluştuğu satırın numarası ile döner.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

İstisnanın oluştuğu satırın numarası ile döner.

Örnekler

Örnek 1 - Exception::getLine() örneği

<?php
try {
throw new
Exception("Bir hata iletisi");
} catch(
Exception $e) {
echo
"İstisnanın oluştuğu satırın numarası: " . $e->getLine();
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

İstisnanın oluştuğu satırın numarası: 3

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top