xref: /PHP-8.0/ext/com_dotnet/tests/bug77578.phpt (revision a555cc0b)
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--EXPECT--
19array(0) {
20}
21int(0)
22