1--TEST--
2Test opendir() function : usage variations - open a directory twice
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') {
6  die("skip Valid only on Windows");
7}
8?>
9--FILE--
10<?php
11/*
12 * Call opendir() twice with the same directory as $path argument
13 */
14
15echo "*** Testing opendir() : usage variation ***\n";
16
17$path = __DIR__ . "/私はガラスを食べられますopendir_variation3";
18mkdir($path);
19
20echo "\n-- Open directory first time: --\n";
21var_dump($dh1 = opendir($path));
22
23echo "\n-- Open directory second time: --\n";
24var_dump($dh2 = opendir($path));
25
26if ($dh1 !== $dh2) {
27    echo "\nNew resource created\n";
28} else {
29    echo "\nNo new resource created\n";
30}
31
32closedir($dh1);
33closedir($dh2);
34?>
35--CLEAN--
36<?php
37$path = __DIR__ . "/私はガラスを食べられますopendir_variation3";
38rmdir($path);
39?>
40--EXPECTF--
41*** Testing opendir() : usage variation ***
42
43-- Open directory first time: --
44resource(%d) of type (stream)
45
46-- Open directory second time: --
47resource(%d) of type (stream)
48
49New resource created
50