xref: /PHP-7.3/ext/com_dotnet/tests/bug78694.phpt (revision 45a77232)
1--TEST--
2Bug #78694 (Appending to a variant array causes segfault)
3--SKIPIF--
4<?php
5if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
6?>
7--FILE--
8<?php
9foreach ([new com('WScript.Shell'), new variant([])] as $var) {
10    try {
11        $var[] = 42;
12    } catch (com_exception $ex) {
13        var_dump($ex->getMessage());
14    }
15}
16?>
17--EXPECT--
18string(38) "appending to variants is not supported"
19string(38) "appending to variants is not supported"
20