error_log
brefphp/bref
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Send an error message to the defined error handling routines
error_log
(
string $message
,
int $message_type
=
0
,
?
string $destination
=
null
,
?
string $additional_headers
=
null
):
bool
require
__DIR__
.
'/../vendor/autoload.php'
;
if (isset(
$_GET
[
'sleep'
])) {
error_log
(
'This is a log'
);
sleep
(
10
);
}
demo/http.php
}
if (
$_GET
[
'error_log'
] ??
false
) {
error_log
(
'This is a test log from error_log'
);
}
if (
$_GET
[
'exception'
] ??
false
) {
tests/Functional/fpm/index.php
<?
php
declare(
strict_types
=
1
);
error_log
(
'This is a test message'
);
tests/Handler/PhpFpm/error.php
<?
php
declare(
strict_types
=
1
);
error_log
(
'This is a log message'
);
$timeout
= (int) (
$_GET
[
'timeout'
] ??
10
);
$result
=
sleep
(
$timeout
);
tests/Handler/PhpFpm/timeout.php
}
if (
$event
[
'error_log'
] ??
false
) {
error_log
(
'This is a test log from error_log'
);
}
if (
$event
[
'exception'
] ??
false
) {
tests/Sam/Php/function.php
}
if (
$_GET
[
'error_log'
] ??
false
) {
error_log
(
'This is a test log from error_log'
);
}
if (
$_GET
[
'exception'
] ??
false
) {
tests/Sam/PhpFpm/index.php