1--TEST--
2Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
3--SKIPIF--
4<?php
5if (!extension_loaded("xmlrpc")) print "skip";
6if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
7?>
8--FILE--
9<?php
10$obj = new stdClass;
11$obj->xmlrpc_type = 'base64';
12$obj->scalar = 0x1122334455;
13var_dump(xmlrpc_encode($obj));
14var_dump($obj);
15?>
16--EXPECTF--
17string(135) "<?xml version="1.0" encoding="utf-8"?>
18<params>
19<param>
20 <value>
21  <base64>NzM1ODgyMjkyMDU=&#10;</base64>
22 </value>
23</param>
24</params>
25"
26object(stdClass)#1 (2) {
27  ["xmlrpc_type"]=>
28  string(6) "base64"
29  ["scalar"]=>
30  int(73588229205)
31}
32