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