Curl/CurlOptions.php
static public function checkOptionValue($option, $value, $throw = true) {

        if (!static::$option_value_types) {
            static::loadOptions();
        }

        if(static::isValidOption($option)) {
            $result = static::checkType($value, static::$option_value_types[$option]);

            if(!$result && $throw) {
                throw new \InvalidArgumentException("Invalid value for the given cURL option");
            }

            return $result;
        } else {
            throw new \InvalidArgumentException("Not a valid cURL option");
        }
    }
static public function checkOptionValue($option, $value, $throw = true) {

        if (!static::$option_value_types) {
            static::loadOptions();
        }

        if(static::isValidOption($option)) {
            $result = static::checkType($value, static::$option_value_types[$option]);

            if(!$result && $throw) {
                throw new \InvalidArgumentException("Invalid value for the given cURL option");
            }

            return $result;
        } else {
            throw new \InvalidArgumentException("Not a valid cURL option");
        }
    }
static public function checkOptionValue ( $ option , $ value , $ throw = true ) { if ( ! static :: $ option_value_types ) { static :: loadOptions ( ) ; } if ( static :: isValidOption ( $ option ) ) { $ result = static :: checkType ( $ value , static :: $ option_value_types [ $ option ] ) ; if ( ! $ result && $ throw ) { throw new \ InvalidArgumentException ( "Invalid value for the given cURL option" ) ; } return $ result ; } else { throw new \ InvalidArgumentException ( "Not a valid cURL option" ) ; } }
Check whether or not the value is a valid type for the given option

@param int $option An integer flag
@param mixed $value the value to be set to the integer flag
@return boolean Whether or not the value is of the correct type

@throws \InvalidArgumentException if the $option _is_not_ a valid cURL option
Check whether or not the value is a valid type for the given option