About the closest thing built-in are the FILE and LINE constants. From the manual section on Predefined Constants:
<?php
function report_error($file, $line, $message)
{
echo "An error occured in $file on line $line: $message.";
}
report_error(FILE, LINE, "Something went wrong!");
?>