Dutch PHP Conference 2025 - Call For Papers

Error::getFile

(PHP 7, PHP 8)

Error::getFileGets the file in which the error occurred

Опис

final public Error::getFile(): string

Get the name of the file the error occurred.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Returns the filename in which the error occurred.

Приклади

Приклад #1 Error::getFile() example

<?php
try {
throw new
Error;
} catch(
Error $e) {
echo
$e->getFile();
}
?>

Поданий вище приклад виведе щось схоже на:

/home/bjori/tmp/ex.php

Прогляньте також

add a note

User Contributed Notes

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