is_countable

Advertisement

Summery Summery

Polyfill for is_countable() function added in PHP 7.3.

Syntax Syntax

is_countable( mixed $var )

Description Description

Verify that the content of a variable is an array or an object implementing the Countable interface.

Parameters Parameters

$var

(mixed) (Required) The value to check.

Return Return

(bool) True if $var is countable, false otherwise.

Source Source

File: wp-includes/compat.php

			|| $var instanceof SimpleXMLElement
			|| $var instanceof ResourceBundle
		);
	}
}

if ( ! function_exists( 'is_iterable' ) ) {

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.6 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.