xref: /PHP-7.2/ext/com_dotnet/tests/bug77578.phpt (revision 41bc51ce)
1--TEST--
2Bug #77578 (Crash when php unload)
3--SKIPIF--
4<?php
5if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
6?>
7--FILE--
8<?php
9// To actually be able to verify the crash during shutdown on Windows, we have
10// to execute a PHP subprocess, and check its exit status.
11$php = PHP_BINARY;
12$ini = php_ini_loaded_file();
13$iniopt = $ini ? "-c $ini" : '';
14$command = "$php $iniopt -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\"";
15exec($command, $output, $status);
16var_dump($output, $status);
17?>
18===DONE===
19--EXPECT--
20array(0) {
21}
22int(0)
23===DONE===
24