Specify custom error message formats for PHP.
$url = $_SERVER['REQUEST_URI'];
ini_set( 'error_message_format', '{message} from URL' . $url );
Available replacements:
{message}
The error message string{file}
The file name the error originated{line}
The line number the error originated
Supports PHP versions 8+
error_message_format
is not compatible with Xdebug.
This project is licensed under the MIT License.