php8.5
Home/ Manual/ xmlrpc / functions/ xmlrpc_get_type

xmlrpc_get_type

PHP function Edit on GitHub ✎

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

Gets xmlrpc type for a PHP value

Description

xmlrpc_get_type(mixed $value): string

Func

This function is especially useful for base64 and datetime strings.

Parameters

value

PHP value

Return Values

Returns the XML-RPC type.

Examples

XML-RPC type example

php
<?php
echo xmlrpc_get_type(null) . "\n"; // base64
echo xmlrpc_get_type(false) . "\n"; // boolean
echo xmlrpc_get_type(1) . "\n"; // int
echo xmlrpc_get_type(1.0) . "\n"; // double
echo xmlrpc_get_type("") . "\n"; // string
echo xmlrpc_get_type(array()) . "\n"; // array
echo xmlrpc_get_type(new stdClass) . "\n"; // array
echo xmlrpc_get_type(STDIN) . "\n"; // int
?>

See Also

Source: reference/xmlrpc/functions/xmlrpc-get-type.xml · from the official PHP manual (php/doc-en)