PHP 8.3.4 Released!

xmlrpc_get_type

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

xmlrpc_get_typeObtém o tipo XML-RPC para um valor PHP

Descrição

xmlrpc_get_type(mixed $value): string
Aviso

Esta função é EXPERIMENTAL. O comportamento desta função, seu nome e documentação poderão mudar sem aviso prévio em futuras versões do PHP. Use por sua conta e risco.

Essa função é especialmente útil para strings datetime e base64.

Parâmetros

value

Valor PHP

Valor Retornado

Retorna o tipo XML-RPC.

Exemplos

Exemplo #1 Exemplo de tipo XML-RPC

<?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
?>

Veja Também

add a note

User Contributed Notes 1 note

up
0
hfuecks at pinkgoblin dot com
21 years ago
This function returns the type of a PHP variable in XML-RPC terms. It won't "spot" base64 or iso8601 types unless they have been defined using xmlrpc_set_type().

For iso8601 type it returns "datetime".

Otherwise it returns strings corresponding directly the XML-RPC data types e.g. "struct","int","string","base64" etc.
To Top