PHP Luminova: Runtime Utility Class
Luminova built-in development server, leveraging PHP's development server functionality. This is useful for development and testing your application in a controlled environment.
The Runtime class is the central utility hub for the Luminova framework and application runtime. It provides framework-level static helper methods to simplify common runtime, environment, and platform checks, along with a lightweight in-memory shared storage registry that can be accessed across the application codebase.
All methods are static, so there's no need to instantiate the class.
NoteThe shared storage provided by this class is runtime-only, comparable in concept to Swift's
UserDefaultsor Android/JavaSharedPreferences, but not persistent:
- Data is lost at the end of each request.
- Values are not shared across processes or workers.
- Nothing is written to disk.
Usage Examples
use Luminova\Runtime;
Runtime::set('THEME', true);
$context = Runtime::get('THEME', false);
if (Runtime::has('THEME')) {
// Key exists...
}
Runtime::remove('THEME');
Runtime::clear();Class Definition
- Full namespace:
\Luminova\Runtime - This class is a Final class
Constants
| Constant | Value | Description |
|---|---|---|
QUERY_DEBUG | luminova.b.query.debug | Enable or store query debug information. |
ALTER_DROP_COLUMNS | luminova.b.db.alter_drop_columns | Allow dropping columns during table alteration. |
CHECK_ALTER_TABLE | luminova.b.db.check_alter_table | Enable validation before running ALTER TABLE operations. |
MIGRATION_SUCCESS | luminova.b.migration.success | Flag indicating a successful migration execution. |
ALTER_SUCCESS | luminova.b.alter.success | Flag indicating a successful table alteration. |
DROP_TRANSACTION | luminova.O.db.transaction | Store database transaction object. |
QUERY_PROFILING | luminova.a.db.query.profiling | Store query execution profiling data. |
CLASS_METADATA | luminova.a.class.metadata | Store routed class metadata used during runtime. |
TEMPLATE_CONTEXT | luminova.s.template.context | Store rendered template context ID. |
Methods
isEnv
Determine whether the application is running in the specified runtime.
The comparison is case-insensitive.
public static function isEnv(string $name): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | Runtime name to check. |
Return:
bool - Return true if the current runtime matches, otherwise false.
Example:
if (Runtime::isEnv('docker')) {
// Running inside a Docker container.
}isLocal
Determine whether the current request is from a local environment.
This is a heuristic check based on:
- Local hostnames (
localhost,127.0.0.1,::1). - Private / loopback IP ranges (e.g.,
127.x.x.x,10.x.x.x,192.168.x.x,172.16.x.xto172.31.x.x).
The result is cached after the first call.
public static function isLocal(): boolReturn:
bool - Return true if the request appears to originate from a local environment.
Note:This does NOT guarantee environment type (dev/prod). It only detects local network characteristics.
Example:
if (Runtime::isLocal()) {
// Skip strict CORS checks for local development.
}isDocker
Determine whether the application is running in a Docker environment.
This is a convenience wrapper around self::isContainer() that checks specifically for the Docker runtime.
public static function isDocker(): boolReturn:
bool - Return true if Docker is detected, otherwise false.
Example:
if (Runtime::isDocker()) {
// Use container-friendly file paths.
}isContainer
Determine whether the application is running in a supported runtime environment.
When no runtime is specified, checks whether any supported runtime is detected. When a runtime is specified, checks only that runtime. The php alias is treated as novakit.
Supported runtimes include docker, kubernetes, containerd, podman, and novakit.
public static function isContainer(?string $runtime = null): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$runtime | ?string | Runtime name to check, or null to check for any supported runtime. |
Return:
bool - Return true if the requested runtime is detected, otherwise false.
Example:
if (Runtime::isContainer('kubernetes')) {
// Running inside a Kubernetes pod.
}
if (Runtime::isContainer()) {
// Running inside any supported container runtime.
}isOutsideContainer
Determine whether the application is running outside a detected runtime environment.
Checks if any supported container or runtime environment is detected.
public static function isOutsideContainer(): boolReturn:
bool - Return true if no supported runtime is detected, otherwise false.
Example:
if (Runtime::isOutsideContainer()) {
// Running directly on bare metal or a VM.
}name
Get the name of the current runtime environment.
The runtime name is resolved from the RUNTIME_ENV environment variable. This allows the runtime to be explicitly identified when automatic container detection cannot determine the environment.
public static function name(): ?stringReturn:
string|null - Return the runtime name, or null if none is defined.
Example:
$runtime = Runtime::name();
// e.g., "docker", "podman", "kubernetes", or nullThe value may be set through any container configuration mechanism that exposes environment variables to the application, including Docker, Docker Compose, Podman, Kubernetes, or a container orchestration platform.
Setting the runtime name:
Docker:
ENV RUNTIME_ENV=dockerDocker Compose:
services:
app:
environment:
RUNTIME_ENV: dockerPodman:
podman run -e RUNTIME_ENV=podman my-appKubernetes:
env:
- name: RUNTIME_ENV
value: kubernetesAny container configuration that exposes RUNTIME_ENV to PHP can be used:
RUNTIME_ENV=<runtime-name>For example:
RUNTIME_ENV=docker
RUNTIME_ENV=podman
RUNTIME_ENV=kubernetes
RUNTIME_ENV=ecs
RUNTIME_ENV=custom-runtimeThis is useful when the runtime cannot be reliably detected from container-specific files or
/proc/1/cgroup.
isCommand
Determine whether the application is running in CLI (Command-Line Interface) mode.
Uses the PHP SAPI and common CLI indicators to distinguish command-line execution from web requests.
public static function isCommand(): boolReturn:
bool - Return true if running in CLI mode, otherwise false.
Example:
if (Runtime::isCommand()) {
// Running via CLI/novakit.
}isHmvc
Determine whether HMVC mode is enabled.
The env(feature.app.hmvc) configuration value is read once and cached for subsequent calls.
public static function isHmvc(): boolReturn:
bool - Return true if HMVC mode is enabled, otherwise false.
Example:
if (Runtime::isHmvc()) {
// Resolve controllers using the HMVC module structure.
}isPlatform
Determine whether the application is running on a specific platform.
Supports common operating system families, BSD variants, Solaris, and common AWS and Azure runtime environments. Custom platform names are matched against the operating system name returned by php_uname().
Supported Platform Values:
mac— macOS.windows— Windows.linux— Linux.freebsd— FreeBSD.openbsd— OpenBSD.bsd— Any BSD-based operating system.solaris— Solaris.aws— AWS runtime environment.azure— Azure runtime environment.
Custom platform names are also supported and are matched case-insensitively against the current operating system name.
public static function isPlatform(string ...$names): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$names | string | Platform name to check, such as windows, linux, mac, aws, or azure. |
Return:
bool - Return true if the current platform matches the specified name, otherwise false.
Example:
Runtime::isPlatform('windows');
Runtime::isPlatform('linux');
Runtime::isPlatform('mac');
Runtime::isPlatform('aws');
Runtime::isPlatform('azure');isFunctionDisabled
Check whether a PHP function is disabled by the server configuration.
Reads the configured disabled function list and checks if the specified function is unavailable due to PHP's disable_functions setting.
public static function isFunctionDisabled(string $function): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$function | string | The PHP function name to check. |
Return:
bool - Return true if the function is disabled, otherwise false.
Example:
if (Runtime::isFunctionDisabled('exec')) {
// Fall back to an alternative implementation.
}disabledFunctions
Returns the list of disabled PHP functions (via the disable_functions directive).
For a single lookup, use isFunctionDisabled(). For repeated lookups, request the associative map and test for keys.
public static function disabledFunctions(bool $flipValue = false): arrayParameters:
| Parameter | Type | Description |
|---|---|---|
$flipValue | bool | Request an associative lookup keyed by function name (default false). |
Return:
array<int,string>|array<string,int|true> - Returns function names or a lookup map keyed by function name.
Example:
$disabled = Runtime::disabledFunctions(true);
if (isset($disabled['exec'])) {
// "exec" is disabled on this server.
}tryFunction
Call a PHP function if it exists and is not disabled.
Returns null when the function is unavailable due to being undefined or disabled by PHP configuration.
public static function tryFunction(string $function, mixed ...$arguments): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$function | string | Function name to call. |
$arguments | mixed | Arguments passed to the function. |
Return:
mixed - Return the function result, or null if the function is unavailable.
Example:
$result = Runtime::tryFunction('set_time_limit', 300);
if ($result === null) {
echo 'Function is unavailable.';
}isCallable
Check whether the given value is callable or represents a callable reference.
In addition to standard PHP callables, two-element arrays are accepted as callable references even when the target cannot currently be called. When $strict is enabled, the referenced class and method must exist.
public static function isCallable(mixed $input, bool $strict = false): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$input | mixed | The value to check (string, array, closure, object, etc.). |
$strict | bool | If true, array callables are valid only if the referenced class exists. |
Return:
bool - Return true if the value is callable or a valid callable reference, otherwise false.
setEncoding
Set the internal multibyte encoding.
On success, the applied encoding is also stored under the app.mb.encoding environment key.
public static function setEncoding(string $encoding): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$encoding | string | The default internal encoding. |
Return:
bool - Return false if encoding is empty or mb_internal_encoding is unavailable, otherwise true.
Example:
Runtime::setEncoding('UTF-8');permission
Check whether a file or directory has the required access permissions.
Checks each requested permission and returns true only when allpermissions are available. When a permission check fails, this methodreturns false by default. If $silent is false, it logs the failurein production and throws a FileException.
Permissions may be specified using shorthand (r, w, x) or readablenames (read, write, execute). Multiple permissions can be combinedusing underscores, plus signs, or commas, and their order is not significant.
public static function permission(
string $permission = 'rw',
?string $file = null,
bool $silent = true
): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$permission | string | The access permission or combination of permissions to check (default 'rw'). |
$file | ?string | The file or directory path to check. If null, defaults to the application's writeable directory. |
$silent | bool | Whether to suppress the exception and return false when a required permission is unavailable. (default: true). |
Return:
bool - Return true if all required permissions are available, otherwise false.
Throws:
- Luminova\Exceptions\FileException - If the file does not have the required permissions,
$silentis false, and the failure could not be logged (i.e. not in production, or logging failed to dispatch).
hasPermission
Check whether a file or directory has the specified access permissions.
Supports read, write, and execute permissions individually or in combination. Permissions can be specified using shorthand (r, w, x) or readable names (read, write, execute). Multiple permissions may be separated by underscores, plus signs, or commas, and their order is not significant. Unlike self::permission(), this method never throws and simply returns the check result.
Supported permissions:
rorread- Read access.worwrite- Write access.xorexecute- Execute access.rworread_write- Read and write access.rxorread_execute- Read and execute access.wxorwrite_execute- Write and execute access.rwxorread_write_execute- Read, write, and execute access.
public static function hasPermission(
string $permission,
string $file
): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$permission | string | The access permission or combination of permissions to check. |
$file | string | The file or directory path to check. |
Return:
bool - Return true if all requested permissions are available, otherwise false.
Example:
Runtime::hasPermission('read', $file);
Runtime::hasPermission('read_write', $file);
Runtime::hasPermission('write+read', $file);
Runtime::hasPermission('execute,read,write', $file);
Runtime::hasPermission('rwx', $file);setTimezone
Sets the default PHP timezone.
If the specified timezone is already active, no changes are made and true is returned. The timezone may be provided as a DateTimeZone instance or a valid timezone identifier. On success, the applied timezone is also stored under the app.timezone environment key.
public static function setTimezone(DateTimeZone|string $timezone): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$timezone | DateTimeZone|string | The timezone to set. |
Return:
bool - Return true on success, or false if the timezone is empty, invalid, or date_default_timezone_set() is unavailable.
Example:
$timezone = 'UTC';
Runtime::setTimezone($timezone);
echo date_default_timezone_get(); // UTC
// Optionally read back the applied value from env
echo env('app.timezone'); // UTCsetExecutionTime
Set the max script execution time, in seconds.
Updates the limit only when increasing it or disabling it (0). Has no effect on Windows. On success, the applied value is also stored under the script.execution.limit environment key.
public static function setExecutionTime(int $seconds): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$seconds | int | Time limit in seconds (0 = unlimited). |
Return:
bool - Return true on success, false otherwise.
Example:
Runtime::setExecutionTime(300);setIgnoreUserAbort
Set whether the script should continue running after the client disconnects.
On success, the applied flag is also stored under the script.ignore.abort environment key.
public static function setIgnoreUserAbort(bool $ignore): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$ignore | bool | Whether to ignore or continue on client disconnect. |
Return:
bool - Return true on success, or false if ignore_user_abort() is unavailable.
Example:
Runtime::setIgnoreUserAbort(true);setLocale
Set the default locale for all or specific locale categories.
On success, when $category is LC_ALL, the applied locale is also stored under the app.locale environment key.
public static function setLocale(string $locale, int $category = LC_ALL): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$locale | string | The default application locale to set. |
$category | int | The category affected by the locale setting (e.g., LC_*). |
Return:
bool - Return true if the locale was applied, false if $locale is empty or invalid.
Example:
Runtime::setLocale('en_US.UTF-8');
Runtime::setLocale('en_US.UTF-8', LC_TIME);For request-derived cache identifiers, see AbstractKernel::getRequestCacheId().
Runtime Cache
set
Store a shared value by key.
Saves a value in the shared storage. If both the existing value and the new value are arrays, they are merged using array_replace, with the new values overriding existing ones.
public static function set(string $key, mixed $value): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | The storage key. |
$value | mixed | The value to store. |
Return:
mixed - Return the stored value.
Example:
use Luminova\Runtime;
Runtime::set('theme', 'dark');
Runtime::set('config', ['debug' => true]);
Runtime::set('config', ['cache' => false]); // merges with existing arrayadd
Add a value to a shared array entry.
Ensures the storage key exists as an array, then assigns the value at the given index.
public static function add(string $key, string|int $index, mixed $value): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | The storage key. |
$index | string|int | The array index to add the value to. |
$value | mixed | The value to store. |
Return:
mixed - Return the stored value.
Example:
use Luminova\Runtime;
Runtime::add('routes', 'home', '/');
Runtime::add('routes', 'login', '/login');get
Get a shared value.
Retrieves a value stored under the specified key. Returns null if the key does not exist.
public static function get(string $key): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | The key to retrieve. |
Return:
mixed - Return the stored value or null if not found.
Example:
use Luminova\Runtime;
$theme = Runtime::get('theme') ?? 'light';has
Check if a key exists in the shared storage.
public static function has(string $key): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | The key to check. |
Return:
bool - Return true if the key exists, false otherwise.
Example:
use Luminova\Runtime;
if (Runtime::has('theme')) {
echo Runtime::get('theme');
}remove
Remove a value from the shared storage.
By default, this method protects Luminova internal keys (see ALL_KEYS) and will not remove framework-owned storage entries. To force removal of a core key, explicitly set $userDefined to false.
public static function remove(string $key, bool $userDefined = true): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | The storage key to remove. |
$userDefined | bool | Whether to enforce protection for core keys. |
Example:
use Luminova\Runtime;
// Remove a user-defined key
Runtime::remove('theme');
// Force removal of a core key (not recommended)
Runtime::remove(Runtime::CLASS_METADATA, false);clear
Clear all user-defined values from the shared storage.
Core Luminova keys (see ALL_KEYS) are preserved and cannot be removed by this method. This makes the operation safe to use in long-running processes and framework-level code.
public static function clear(): voidExample:
use Luminova\Runtime;
Runtime::clear();count
Count the number of keys currently stored.
public static function count(): intReturn:
int - Return the number of stored keys.
Example:
use Luminova\Runtime;
$count = Runtime::count();isProduction
Determines whether the application is running in production mode.
public static function isProduction(): boolReturn:
bool - Returns true if the application is in production mode, false otherwise.
isStaging
Determines whether the application is running in staging mode.
public static function isStaging(): boolReturn:
bool - Returns true if the application is in staging mode, false otherwise.
isLocalhost
Determine whether the current request is addressed to localhost.
public static function isLocalhost(): boolReturn:
bool - true if the request is addressed to localhost, otherwise false.
memoryLimit
Get the current PHP memory limit in bytes.
public static function memoryLimit(
int $division = 0,
int $reserve = 0
): intParameters:
| Parameter | Type | Description |
|---|---|---|
$division | int | Optional positive division factor used to scale down the memory limit (default 0). |
$reserve | int | Optional minimum memory value in bytes (default 0). |
Return:
int - The memory limit in bytes, or 0 when it cannot be determined.
safeMemoryLimit
Calculate a safe memory limit for an operation.
public static function safeMemoryLimit(int $megabytes = 16): intParameters:
| Parameter | Type | Description |
|---|---|---|
$megabytes | int | Maximum memory to allow in megabytes. |
Return:
int - The safe memory limit in bytes.
getIniValue
Retrieves the value of a PHP configuration directive.
public static function getIniValue(string $name): stringParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | The PHP configuration directive name. |
Return:
string - Returns the directive value.
tryGetIniValue
Attempts to retrieve the value of a PHP configuration directive.
public static function tryGetIniValue(
string $name,
string|false $default = false
): string|falseParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | The PHP configuration directive name. |
$default | string|false | Default value returned when the directive cannot be read. |
Return:
string|false - Returns the directive value, or the default value on failure.
trySetIniValue
Attempts to set a PHP configuration directive at runtime.
public static function trySetIniValue(string $name, mixed $value): string|falseParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | The PHP configuration directive name. |
$value | mixed | The value to assign. |
Return:
string|false - Returns the previous value on success, or false on failure.
getConstantValue
Retrieves the value of a defined PHP constant.
public static function getConstantValue(string $name, mixed $default = null): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | The constant name, including its class or namespace if applicable. |
$default | mixed | The fallback value when the constant is not defined. |
Return:
mixed - Returns the constant value if defined, otherwise the default value.
isProfilingEnabled
Determine whether performance profiling is enabled.
public static function isProfilingEnabled(): boolReturn:
bool - true if performance profiling is enabled, otherwise false.
isPhpServer
Identify the built-in PHP server started by Novakit, using the server marker and Novakit version.
public static function isPhpServer(): boolReturn:
bool - Returns true when both the PHP server SAPI and Novakit marker match.
isLocalAddress
Check the first available address from HTTP_HOST, SERVER_NAME, or REMOTE_ADDR. A single port suffix is removed and the result is cached.
public static function isLocalAddress(): boolReturn:
bool - Returns true when the address is an IPv4 address in the 10/8, 172.16/12, or 192.168/16 ranges.
isWsl
Detect Windows Subsystem for Linux using the WSL environment variables or the Linux kernel version string.
public static function isWsl(): boolReturn:
bool - Returns true when a WSL marker is detected on Linux.
isUploadProgressEnabled
Check the PHP session upload progress settings. The result is cached.
public static function isUploadProgressEnabled(): boolReturn:
bool - Returns true when upload progress is enabled and the progress field name is non-empty.
cleanOutputBuffers
Discard or flush PHP output buffers. auto preserves at least one buffer, all clears down to the limit, top discards the top buffer, and flush flushes it. CLI and PHPDBG calls return false.
public static function cleanOutputBuffers(string $mode = 'auto', int $limit = 0): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$mode | 'auto'\|'all'\|'top'\|'flush' | Buffer handling mode. |
$limit | int | Minimum level to preserve for auto and all. Must be non-negative. |
Return:
bool - Returns true if a buffer was cleared or flushed.
setOutputHandler
Start a PHP output buffer. When compression is enabled, the method uses the supplied handler, the configured handler, or ob_gzhandler.
public static function setOutputHandler(
bool $clearIfSet = false,
bool $useCompressionHandler = true,
?callable $handler = null,
int $chunkSize = 0,
int $flags = PHP_OUTPUT_HANDLER_STDFLAGS
): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$clearIfSet | bool | Try to clear existing buffers first. |
$useCompressionHandler | bool | Use a compression handler when enabled by application settings. |
$handler | callable\|null | Optional compression callback. |
$chunkSize | int | Buffer chunk size in bytes. |
$flags | int | PHP output-handler flags. |
Return:
bool - Returns true when the buffer starts, or false if headers were sent, an existing buffer prevented startup, or startup failed.
Throws:
Luminova\Exceptions\InvalidArgumentException- If the configured compression handler is invalid.
lastError
Read the stored error details, falling back to PHP’s most recent error.
public static function lastError(): arrayReturn:
array{type:int,message:string,file:string,line:int}|array{} - Returns the error details or an empty array.
lastErrorCode
Read the stored error code.
public static function lastErrorCode(string|int $default = E_ERROR): string|intParameters:
| Parameter | Type | Description |
|---|---|---|
$default | string\|int | Fallback code when no code is stored. |
Return:
string|int - Returns the stored code or the fallback.
lastErrorBacktrace
Read the stored backtrace.
public static function lastErrorBacktrace(): arrayReturn:
array<int,array<string,mixed>> - Returns the backtrace frames or an empty array.
setLastError
Store PHP error details for lastError().
public static function setLastError(array $error): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$error | array{type:int,message:string,file:string,line:int} | Error details to store. |
setLastErrorCode
Store the code returned by lastErrorCode().
public static function setLastErrorCode(string|int $code): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$code | string\|int | Error code to store. |
clearLastError
Clear the internal error context and PHP’s last recorded error.
public static function clearLastError(): voidsetLastBacktrace
Store a backtrace in the internal error context.
public static function setLastBacktrace(array $backtrace, bool $push = true): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$backtrace | array<int,array<string,mixed>> | Backtrace frames. |
$push | bool | Prepend the supplied frames to an existing trace. False replaces it. |
setIniValue
Update a PHP INI directive with ini_set().
public static function setIniValue(
string $name,
string|int|float|bool|null $value,
?string $label = null
): stringParameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | INI directive name. |
$value | string\|int\|float\|bool\|null | New value. |
$label | string\|null | Optional label used in the error message. |
Return:
string - Returns the previous value.
Throws:
Luminova\Exceptions\RuntimeException- If the setter is unavailable or the change fails.
setMemoryLimit
Set the PHP memory limit in megabytes. Safe mode adjusts the request to respect current memory usage and an existing finite limit.
public static function setMemoryLimit(
int $megabytes,
bool $safeMode = true
): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$megabytes | int | Requested memory limit in megabytes. Must be positive. |
$safeMode | bool | Apply the safe-mode bounds. |
Return:
bool - Returns true when the limit is set or the target is already satisfied.
getStaticCacheTypes
Read the configured static cache types. The method removes empty values and duplicates and caches the resulting string.
public static function getStaticCacheTypes(): stringReturn:
string - Returns a pipe-delimited configuration string, or an empty string when no types are configured.
profiling
Start or stop framework profiling when enabled. Repeated starts and stops without an active session are ignored.
public static final function profiling(string $mode, ?array $command = null): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$mode | 'start'\|'stop' | Profiling action. |
$command | array<string,mixed>\|null | Optional command metadata passed to the profiler when stopping. |
Throws:
Luminova\Exceptions\InvalidArgumentException- If profiling is enabled and the action is unsupported.
defineStandardStreams
Define missing PHP standard stream constants. The method attempts to open stdin for reading and stdout and stderr for writing. If PHP cannot open a stream, the corresponding constant receives its stream URI instead.
public static function defineStandardStreams(): void