wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



is_countable › WordPress Function

Od4.9.6
Przestarzałyn/a
is_countable ( $value )
Parametry:
  • (mixed) $value The value to check.
    Wymagane: Tak
Powrót:
  • (bool) True if `$value` is countable, false otherwise.
Zdefiniowane na:
Codex:

Polyfill for is_countable() function added in PHP 7.3.

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


Źródło

function is_countable( $value ) {
		return ( is_array( $value )
			|| $value instanceof Countable
			|| $value instanceof SimpleXMLElement
			|| $value instanceof ResourceBundle
		);
	}
}