WP_Http_Encoding::is_available()

Whether decompression and compression are supported by the PHP version.


Description Description

Each function is tested instead of checking for the zlib extension, to ensure that the functions all exist in the PHP version and aren’t disabled.


Return Return

(bool)


Top ↑

Source Source

File: wp-includes/class-wp-http-encoding.php

	public static function is_available() {
		return ( function_exists( 'gzuncompress' ) || function_exists( 'gzdeflate' ) || function_exists( 'gzinflate' ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.