WpOrg\Requests\Utility

InputValidator::is_stringable_object()public staticWP 1.0

Verify whether a received input parameter is "stringable".

Method of the class: InputValidator{}

No Hooks.

Return

true|false.

Usage

$result = InputValidator::is_stringable_object( $input );
$input(mixed) (required)
Input parameter to verify.

InputValidator::is_stringable_object() code WP 6.6.2

public static function is_stringable_object($input) {
	return is_object($input) && method_exists($input, '__toString');
}