WP_Site_Health::test_php_extension_availability

Private AccessPrivate Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

SummerySummery

Check if the passed extension or function are available.

Syntax

WP_Site_Health::test_php_extension_availability( string $extension = null, string $function = null, string $constant = null, string $class = null )

DescriptionDescription

Make the check for available PHP modules into a simple boolean operator for a cleaner test runner.

ParametersParameters

$extension

(string) (Optional) The extension name to test.

Default value: null

$function

(string) (Optional) The function name to test.

Default value: null

$constant

(string) (Optional) The constant name to test for.

Default value: null

$class

(string) (Optional) The class name to test for.

Default value: null

ReturnReturn

(bool) Whether or not the extension and function are available.

SourceSource

File: wp-admin/includes/class-wp-site-health.php


			

ChangelogChangelog

Changelog
Version Description
5.3.0 The $constant and $class parameters were added.
5.2.0 Introduced.
Scroll to Top