<?php is_resource(mixed $value): bool
<?php private function hasColorSupport($stream): bool { if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { return false; }