PluginProbe
ActivityPub / 7.7.0
ActivityPub v7.7.0
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/compat.php +13 -1 9.2.07.7.0 View file →
@@ -41,10 +41,22 @@
41 41 return strlen( $needle ) === 0 || substr( $haystack, - strlen( $needle ) ) === $needle;
42 42 }
43 43 }
44 44
45 +if ( ! function_exists( 'is_countable' ) ) {
46 + /**
47 + * Polyfill for `is_countable()` function added in PHP 7.3.
48 + *
49 + * @param mixed $value The value to check.
50 + * @return bool True if `$value` is countable, otherwise false.
51 + */
52 + function is_countable( $value ) {
53 + return is_array( $value ) || $value instanceof Countable;
54 + }
55 +}
56 +
45 57 /**
46 - * Polyfill for `array_is_list()` function added in PHP 8.1.
58 + * Polyfill for `array_is_list()` function added in PHP 7.3.
47 59 *
48 60 * @param array $array The array to check.
49 61 *
50 62 * @return bool True if `$array` is a list, otherwise false.