1--TEST--
2Test scandir() function : usage variations - different ints as $sorting_order arg
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 * Pass different integers as $sorting_order argument to test how scandir()
13 * re-orders the array
14 */
15
16echo "*** Testing scandir() : usage variations ***\n";
17
18// include for create_files/delete_files functions
19include(__DIR__ . '/../file/file.inc');
20
21// create directory and files
22$dir = __DIR__ . '/私はガラスを食べられますscandir_variation9';
23mkdir($dir);
24@create_files($dir, 2, "numeric", 0755, 1, "w", "私はガラスを食べられますfile");
25
26// different ints to pass as $sorting_order argument
27$ints = array (PHP_INT_MAX, -PHP_INT_MAX, 0);
28
29foreach($ints as $sorting_order) {
30    var_dump( scandir($dir, $sorting_order) );
31}
32
33delete_files($dir, 2, "私はガラスを食べられますfile");
34?>
35--CLEAN--
36<?php
37$dir = __DIR__ . '/私はガラスを食べられますscandir_variation9';
38rmdir($dir);
39?>
40--EXPECT--
41*** Testing scandir() : usage variations ***
42array(4) {
43  [0]=>
44  string(45) "私はガラスを食べられますfile2.tmp"
45  [1]=>
46  string(45) "私はガラスを食べられますfile1.tmp"
47  [2]=>
48  string(2) ".."
49  [3]=>
50  string(1) "."
51}
52array(4) {
53  [0]=>
54  string(45) "私はガラスを食べられますfile2.tmp"
55  [1]=>
56  string(45) "私はガラスを食べられますfile1.tmp"
57  [2]=>
58  string(2) ".."
59  [3]=>
60  string(1) "."
61}
62array(4) {
63  [0]=>
64  string(1) "."
65  [1]=>
66  string(2) ".."
67  [2]=>
68  string(45) "私はガラスを食べられますfile1.tmp"
69  [3]=>
70  string(45) "私はガラスを食べられますfile2.tmp"
71}
72