src/Reflection/FeatureDetector.php
public function isSupported(string $feature): bool
    {
        if (!array_key_exists($feature, $this->supported)) {
            if (!isset($this->features[$feature])) {
                throw new UndefinedFeatureException($feature);
            }

            $this->supported[$feature] =
                (bool) $this->features[$feature]($this);
        }

        return $this->supported[$feature];
    }
public function isSupported(string $feature): bool
    {
        if (!array_key_exists($feature, $this->supported)) {
            if (!isset($this->features[$feature])) {
                throw new UndefinedFeatureException($feature);
            }

            $this->supported[$feature] =
                (bool) $this->features[$feature]($this);
        }

        return $this->supported[$feature];
    }
public function isSupported ( string $ feature ) : bool { if ( ! array_key_exists ( $ feature , $ this -> supported ) ) { if ( ! isset ( $ this -> features [ $ feature ] ) ) { throw new UndefinedFeatureException ( $ feature ) ; } $ this -> supported [ $ feature ] = ( bool ) $ this -> features [ $ feature ] ( $ this ) ; } return $ this -> supported [ $ feature ] ; }
Returns true if the specified feature is supported by the current
runtime environment.

@param string $feature The feature.

@return bool                      True if supported.
@throws UndefinedFeatureException If the specified feature is undefined.
Returns true if the specified feature is supported by the current runtime environment .