src/Reflection/FeatureDetector.php
public function standardFeatures(): array
    {
        return [
            'stdout.ansi' => function () {
                // @codeCoverageIgnoreStart
                if (DIRECTORY_SEPARATOR === '\\') {
                    return
                        0 >= version_compare(
                        '10.0.10586',
                        PHP_WINDOWS_VERSION_MAJOR .
                            '.' . PHP_WINDOWS_VERSION_MINOR .
                            '.' . PHP_WINDOWS_VERSION_BUILD
                        ) ||
                        false !== getenv('ANSICON') ||
                        'ON' === getenv('ConEmuANSI') ||
                        'xterm' === getenv('TERM') ||
                        false !== getenv('BABUN_HOME');
                }
                // @codeCoverageIgnoreEnd

                return function_exists('posix_isatty') && @posix_isatty(STDOUT);
            },

            'type.object' => function () {
                try {
                    $function =
                        new ReflectionFunction(function (object $a) {});
                    $parameters = $function->getParameters();
                    $result = null === $parameters[0]->getClass();
                    // @codeCoverageIgnoreStart
                } catch (ReflectionException $e) {
                    $result = false;
                }
                // @codeCoverageIgnoreEnd

                return $result;
            },
        ];
    }
public function standardFeatures(): array
    {
        return [
            'stdout.ansi' => function () {
                // @codeCoverageIgnoreStart
                if (DIRECTORY_SEPARATOR === '\\') {
                    return
                        0 >= version_compare(
                        '10.0.10586',
                        PHP_WINDOWS_VERSION_MAJOR .
                            '.' . PHP_WINDOWS_VERSION_MINOR .
                            '.' . PHP_WINDOWS_VERSION_BUILD
                        ) ||
                        false !== getenv('ANSICON') ||
                        'ON' === getenv('ConEmuANSI') ||
                        'xterm' === getenv('TERM') ||
                        false !== getenv('BABUN_HOME');
                }
                // @codeCoverageIgnoreEnd

                return function_exists('posix_isatty') && @posix_isatty(STDOUT);
            },

            'type.object' => function () {
                try {
                    $function =
                        new ReflectionFunction(function (object $a) {});
                    $parameters = $function->getParameters();
                    $result = null === $parameters[0]->getClass();
                    // @codeCoverageIgnoreStart
                } catch (ReflectionException $e) {
                    $result = false;
                }
                // @codeCoverageIgnoreEnd

                return $result;
            },
        ];
    }
public function standardFeatures ( ) : array { return [ 'stdout.ansi' => function ( ) { // @codeCoverageIgnoreStart if ( DIRECTORY_SEPARATOR === '\\' ) { return 0 >= version_compare ( '10.0.10586' , PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD ) || false !== getenv ( 'ANSICON' ) || 'ON' === getenv ( 'ConEmuANSI' ) || 'xterm' === getenv ( 'TERM' ) || false !== getenv ( 'BABUN_HOME' ) ; } // @codeCoverageIgnoreEnd return function_exists ( 'posix_isatty' ) && @ posix_isatty ( STDOUT ) ; } , 'type.object' => function ( ) { try { $ function = new ReflectionFunction ( function ( object $ a ) { } ) ; $ parameters = $ function -> getParameters ( ) ; $ result = null === $ parameters [ 0 ] -> getClass ( ) ; // @codeCoverageIgnoreStart } catch ( ReflectionException $ e ) { $ result = false ; } // @codeCoverageIgnoreEnd return $ result ; } , ] ; }
Get the standard feature detection callbacks.

@return array<string,callable> The standard features.
Get the standard feature detection callbacks .