xref: /PHP-7.0/ext/wddx/tests/bug71335.phpt (revision 285cd341)
1--TEST--
2Bug #71335 (Type Confusion in WDDX Packet Deserialization)
3--SKIPIF--
4<?php
5if (!extension_loaded("wddx")) print "skip";
6?>
7--FILE--
8<?php
9$x = "<?xml version='1.0'?>
10<wddxPacket version='1.0'>
11<header/>
12	<data>
13		<struct>
14			<var name='php_class_name'>
15				<string>stdClass</string>
16			</var>
17			<var name='php_class_name'>
18				<string>stdClass</string>
19			</var>
20		</struct>
21	</data>
22</wddxPacket>";
23
24$d = wddx_deserialize($x);
25var_dump($d);
26?>
27DONE
28--EXPECTF--
29object(stdClass)#%d (1) {
30  ["php_class_name"]=>
31  string(8) "stdClass"
32}
33DONE
34