xmlrpc_get_type

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

xmlrpc_get_typeGets xmlrpc type for a PHP value

설명

string xmlrpc_get_type ( mixed $value )
Warning

이 함수는 실험적입니다. 이 함수의 작동, 함수의 이름, 그리고 관련된 모든 문서는 이후의 PHP 릴리즈에서 예고 없이 변경할 수 있습니다. 이 함수의 사용에 관한 것은 사용자 책임입니다.

This function is especially useful for base64 and datetime strings.

인수

value

PHP value

반환값

Returns the XML-RPC type.

예제

Example #1 XML-RPC type example

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

참고

add a note 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