downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

xmlrpc_is_fault> <xmlrpc_encode
[edit] Last updated: Fri, 17 May 2013

view this page in

xmlrpc_get_type

(PHP 4 >= 4.1.0, PHP 5)

xmlrpc_get_typeObtiene el tipo del xmlrpc para un valor PHP

Descripción

string xmlrpc_get_type ( mixed $value )
Advertencia

Esta función ha sido declarada EXPERIMENTAL. Su comportamiento, su nombre y la documentación que le acompaña puede cambiar sin previo aviso en futuras versiones de PHP. Use esta función bajo su propio riesgo.

Ésta función es específicamente útil para la base64 y las cadenas fecha-hora.

Parámetros

value

valor de PHP

Valores devueltos

Devuelve el tipo de XML-RPC.

Ejemplos

Ejemplo #1 Ejemplo de tipo de 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
?>

Ver también

  • xmlrpc_set_type() - Establece el tipo del xmlrpc, base64 o fecha-hora, para un valor de cadena PHP



add a note add a note User Contributed Notes xmlrpc_get_type - [1 notes]
up
0
hfuecks at pinkgoblin dot com
10 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.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites