xref: /PHP-7.1/ext/com_dotnet/tests/bug34272.phpt (revision 7af945e2)
1--TEST--
2Bug #34272 (empty array onto COM object blows up)
3--SKIPIF--
4<?php
5if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
6--FILE--
7<?php
8error_reporting(E_ALL);
9
10try {
11	$dict = new COM("Scripting.Dictionary");
12	$dict->add('foo', array());
13	print sizeof($dict['foo'])."\n";
14	$dict->add('bar', array(23));
15	print sizeof($dict['bar'])." \n";
16} catch (Exception $e) {
17	print $e;
18}
19?>
20--EXPECT--
210
221
23