wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



is_countable › WordPress Function

Da4.9.6
Deprecaton/a
is_countable ( $value )
Parametri:
  • (mixed) $value The value to check.
    Richiesto:
Ritorna:
  • (bool) True if `$value` is countable, false otherwise.
Definito a:
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.


Sorgenti

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