1--TEST-- 2xmlrpc_encode() Simple test encode type double and String 3--CREDITS-- 4Michel Araujo <araujo_michel@yahoo.com.br> 5#PHPSP 2013-08-22 6--SKIPIF-- 7<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> 8--FILE-- 9<?php 10 11$response = xmlrpc_encode(3.24234); 12echo $response; 13 14$response = xmlrpc_encode(-3.24234); 15echo $response; 16 17$response = xmlrpc_encode('Is string'); 18echo $response; 19--EXPECT-- 20<?xml version="1.0" encoding="utf-8"?> 21<params> 22<param> 23 <value> 24 <double>3.24234</double> 25 </value> 26</param> 27</params> 28<?xml version="1.0" encoding="utf-8"?> 29<params> 30<param> 31 <value> 32 <double>-3.24234</double> 33 </value> 34</param> 35</params> 36<?xml version="1.0" encoding="utf-8"?> 37<params> 38<param> 39 <value> 40 <string>Is string</string> 41 </value> 42</param> 43</params> 44