array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.error-get-last.php', 1 => 'error_get_last', ), 'up' => array ( 0 => 'ref.errorfunc.php', 1 => 'Hata İşleme İşlevleri', ), 'prev' => array ( 0 => 'function.error-clear-last.php', 1 => 'error_clear_last', ), 'next' => array ( 0 => 'function.error-log.php', 1 => 'error_log', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/errorfunc/functions/error-get-last.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
error_get_last — Son oluşan hata hakkında bilgi verir
Bu işlevin bağımsız değişkeni yoktur.
Son oluşan hata hakkındaki bilgileri "type", "message", "file" ve "line"
anahtarlı bir ilişkisel dizi olarak döndürür. Hatanın sebebi PHP'nin dahili
işlevlerinden biriyse "message" işlevin ismi ile başlar. Henüz bir hata
oluşmamışsa null
döner.
Örnek 1 - error_get_last() örneği
<?php
echo $a;
print_r(error_get_last());
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
Array ( [type] => 8 [message] => Undefined variable: a [file] => C:\WWW\index.php [line] => 2 )
display_errors
yönergesihtml_errors
yönergesixmlrpc_errors
yönergesi