xref: /PHP-5.4/ext/xmlrpc/tests/bug38431.phpt (revision 2eef59dc)
1--TEST--
2Bug #38431 (xmlrpc_get_type() crashes PHP on objects)
3--SKIPIF--
4<?php if (!extension_loaded("xmlrpc")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(xmlrpc_get_type(new stdclass));
9var_dump(xmlrpc_get_type(array()));
10$var = array(1,2,3);
11var_dump(xmlrpc_get_type($var));
12$var = array("test"=>1,2,3);
13var_dump(xmlrpc_get_type($var));
14$var = array("test"=>1,"test2"=>2);
15var_dump(xmlrpc_get_type($var));
16
17echo "Done\n";
18?>
19--EXPECTF--
20string(5) "array"
21string(5) "array"
22string(5) "array"
23string(5) "mixed"
24string(6) "struct"
25Done
26