protected function sanitize_requires_php( $version ) {
		$version = trim( $version );

		// x.y or x.y.z
		if ( $version && ! preg_match( '!^\d+(\.\d+){1,2}$!', $version ) ) {
			$this->warnings['requires_php_header_ignored'] = true;
			// Ignore the readme value.
			$version = '';
		}

		return $version;
	}
protected function sanitize_requires_php( $version ) {
		$version = trim( $version );

		// x.y or x.y.z
		if ( $version && ! preg_match( '!^\d+(\.\d+){1,2}$!', $version ) ) {
			$this->warnings['requires_php_header_ignored'] = true;
			// Ignore the readme value.
			$version = '';
		}

		return $version;
	}
protected function sanitize_requires_php ( $ version ) { $ version = trim ( $ version ) ; // x.y or x.y.z if ( $ version && ! preg_match ( '!^\d+(\.\d+){1,2}$!' , $ version ) ) { $ this -> warnings [ 'requires_php_header_ignored' ] = true ; // Ignore the readme value. $ version = '' ; } return $ version ; }
Sanitizes the Requires PHP header to ensure that it's a valid version header.

@param string $version
@return string The sanitized $version
Sanitizes the Requires PHP header to ensure that it s a valid version header .