xref: /PHP-7.1/ext/xmlrpc/tests/bug72647.phpt (revision 69291214)
1--TEST--
2Bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
3--SKIPIF--
4<?php
5if (!extension_loaded("xmlrpc")) print "skip";
6?>
7--FILE--
8<?php
9
10$ar = array(4, "a", 7);
11$v = &$ar[1];
12unset($v);
13
14echo xmlrpc_encode($ar);
15?>
16--EXPECTF--
17<?xml version="1.0" encoding="utf-8"?>
18<params>
19<param>
20 <value>
21  <array>
22   <data>
23    <value>
24     <int>4</int>
25    </value>
26    <value>
27     <string>a</string>
28    </value>
29    <value>
30     <int>7</int>
31    </value>
32   </data>
33  </array>
34 </value>
35</param>
36</params>
37