xref: /PHP-8.2/ext/standard/tests/file/bug47517.phpt (revision c5401854)
1--TEST--
2Bug #47517 test registry virtualization disabled
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') {
6    die('skip only for Windows');
7}
8exec('net session 2>&1', $out, $status);
9if (!$status) {
10    die('skip test runs under an elevated user account');
11}
12?>
13--FILE--
14<?php
15/* This has to behave same way on both 64- and 32-bits. */
16file_put_contents('C:\Program Files\myfile.txt', 'hello');
17?>
18--EXPECTF--
19Warning: file_put_contents(C:\Program Files\myfile.txt): Failed to open stream: Permission denied in %sbug47517.php on line %d
20