//! ref: composer/src/Composer/Util/Platform.php
use std::sync::Mutex;
use anyhow::Result;
use shirabe_external_packages::composer::pcre::Preg;
use shirabe_php_shim::{
PHP_ENV, PHP_SERVER, PhpMixed, PhpResource, RuntimeException, defined, file_exists,
file_get_contents, fstat, function_exists, getcwd, getenv, in_array, ini_get, is_array,
is_readable, mb_strlen, php_os_family, posix_geteuid, posix_getpwuid, posix_getuid,
posix_isatty, putenv, putenv_clear, realpath, stream_isatty, stripos, strlen, strtoupper,
substr, usleep,
};
use crate::util::ProcessExecutor;
use crate::util::Silencer;
/// Platform helper for uniform platform-specific tests.
pub struct Platform;
static IS_VIRTUAL_BOX_GUEST: Mutex