19declare(strict_types=1);
44 return PHP_SAPI ===
'fpm-fcgi';
49 if (PHP_BINARY !==
'') {
50 return escapeshellarg(PHP_BINARY);
53 foreach ([PHP_BINDIR .
'/php', PHP_BINDIR .
'/php-cli.exe', PHP_BINDIR .
'/php.exe'] as $candidate) {
54 if (is_readable($candidate)) {
55 return escapeshellarg($candidate);
66 return (
int) ini_get(
'error_reporting');
71 return filter_var(ini_get(
'log_errors'), FILTER_VALIDATE_BOOLEAN);
76 return filter_var(ini_get(
'display_errors'), FILTER_VALIDATE_BOOLEAN);
109 return (
int) ini_get(
'max_execution_time');
114 return (
int) ini_get(
'max_input_vars');
126 return PHP_OS_FAMILY;
133 if (is_numeric($value)) {
137 $suffix = strtoupper(substr($value, -1));
138 $number = (
int) substr($value, 0, -1);
140 return match ($suffix) {
141 'P' => $number * 1024 ** 5,
142 'T' => $number * 1024 ** 4,
143 'G' => $number * 1024 ** 3,
144 'M' => $number * 1024 ** 2,
145 'K' => $number * 1024,
146 default => (
int) $value,
This class provides the data size with additional information to remove the work to calculate the siz...
getMaxExecutionTime()
Returns max_execution_time in seconds.
parseIniBytes(string $value)
getUploadSizeLimit()
Effective upload size limit: min(post_max_size, upload_max_filesize).
getOperatingSystemFamily()
getPhpBinary()
Returns the escaped path to the PHP CLI binary.
Read access to PHP runtime and server configuration.