CakeFest 2024: The Official CakePHP Conference

xmlrpc_get_type

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

xmlrpc_get_typeBir PHP değerinin xmlrpc türünü döndürür

Açıklama

xmlrpc_get_type(mixed $değer): string
Uyarı

Bu işlev DENEYSELDİR. Bu işlevin davranışı, ismi ve belgeleri PHP'nin sonraki sürümlerinde hiçbir duyuru yapılmaksızın değiştirilebilir. Bu risk göze alınamayacaksa bu işlev kullanılmamalıdır.

Bu işlev, özellikle base64 ve datetime dizgelerinde kullanılır.

Bağımsız Değişkenler

değer

PHP değeri

Dönen Değerler

XML-RPC türünü döndürür.

Örnekler

Örnek 1 XML-RPC tür örneği

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

Ayrıca Bakınız

  • xmlrpc_set_type() - Bir PHP dizge değeri için xmlrpc türünü base64 veya datetime türüne dönüştürür

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