<?php function_exists(string $function): bool
<?php $input = (defined('STDIN') ? STDIN : fopen('php://input', 'r+')); if ($isTtySupported === null && function_exists('proc_open')) { $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); }
<?php } if (! function_exists('exec')) { return false; }
<?php private function hasVt100Support(): bool { return function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w')); }
<?php private function readFromProcess(string $command): ?string { if (! function_exists('proc_open')) { return null; }