src/Range.php
function isNumberIn( $number, $integerConstraint = true ) {
		foreach ( $this->parts as $part ) {
			if ( is_array( $part ) ) {
				if ( ( !$integerConstraint || floor( $number ) === (float)$number )
					&& $number >= $part[0] && $number <= $part[1]
				) {
					return true;
				}
			} else {
				if ( $number == $part ) {
					return true;
				}
			}
		}

		return false;
	}
function isNumberIn( $number, $integerConstraint = true ) {
		foreach ( $this->parts as $part ) {
			if ( is_array( $part ) ) {
				if ( ( !$integerConstraint || floor( $number ) === (float)$number )
					&& $number >= $part[0] && $number <= $part[1]
				) {
					return true;
				}
			} else {
				if ( $number == $part ) {
					return true;
				}
			}
		}

		return false;
	}
function isNumberIn ( $ number , $ integerConstraint = true ) { foreach ( $ this -> parts as $ part ) { if ( is_array ( $ part ) ) { if ( ( ! $ integerConstraint || floor ( $ number ) === ( float ) $ number ) && $ number >= $ part [ 0 ] && $ number <= $ part [ 1 ] ) { return true ; } } else { if ( $ number == $ part ) { return true ; } } } return false ; }
Determine if the given number is inside the range.

@param int $number The number to check
@param bool $integerConstraint If true, also asserts the number is an integer;
otherwise, number simply has to be inside the range.
@return bool True if the number is inside the range; otherwise, false.
Determine if the given number is inside the range .