Download src/php/php-src/ext/com_dotnet/tests/bug77578.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/com_dotnet/tests/bug77578.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/com_dotnet/tests/bug77578.phpt
-
curl -L -o bug77578.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/com_dotnet/tests/bug77578.phpt
1.03 kB
| --TEST-- | |
| Bug #77578 (Crash when php unload) | |
| --EXTENSIONS-- | |
| com_dotnet | |
| --FILE-- | |
| // To actually be able to verify the crash during shutdown on Windows, we have | |
| // to execute a PHP subprocess, and check its exit status. | |
| // First we determine whether com_dotnet would be loaded in the subprocess | |
| $php = getenv('TEST_PHP_EXECUTABLE_ESCAPED'); | |
| $script = <<<SCRIPT | |
| echo extension_loaded('com_dotnet') ? 'yes' : 'no'; | |
| SCRIPT; | |
| exec("$php -r \"$script\"", $output); | |
| var_dump(isset($output[0])); | |
| $loaded = $output[0] === "yes"; | |
| $output = null; | |
| // Then we run the subprocess with com_dotnet loaded | |
| $script = <<<SCRIPT | |
| ini_set('com.autoregister_typelib', '1'); | |
| new COM('WbemScripting.SWbemLocator'); | |
| SCRIPT; | |
| if ($loaded) { | |
| $command = "$php -r \"$script\""; | |
| } else { | |
| $extension_dir = escapeshellarg(ini_get("extension_dir")); | |
| $command = "$php -d extension_dir=$extension_dir -d extension=com_dotnet -r \"$script\""; | |
| } | |
| exec($command, $output, $status); | |
| var_dump($output, $status); | |
| --EXPECT-- | |
| bool(true) | |
| array(0) { | |
| } | |
| int(0) | |