We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c868b1 commit 0535872Copy full SHA for 0535872
ext/spl/tests/dit_004.phpt
@@ -2,7 +2,13 @@
2
SPL: DirectoryIterator and clone
3
--FILE--
4
<?php
5
-$a = new DirectoryIterator(__DIR__);
+
6
+@mkdir($dir = __DIR__ . '/dit_004');
7
+touch($dir . '/file1');
8
+touch($dir . '/file2');
9
+touch($dir . '/file3');
10
11
+$a = new DirectoryIterator($dir);
12
$b = clone $a;
13
var_dump((string)$b == (string)$a);
14
var_dump($a->key(), $b->key());
@@ -13,6 +19,14 @@ $c = clone $a;
19
var_dump((string)$c == (string)$a);
20
var_dump($a->key(), $c->key());
15
21
?>
22
+--CLEAN--
23
+<?php
24
+$dir = __DIR__ . '/dit_004';
25
+unlink($dir . '/file1');
26
+unlink($dir . '/file2');
27
+unlink($dir . '/file3');
28
+rmdir($dir);
29
+?>
16
30
--EXPECT--
17
31
bool(true)
18
32
int(0)
0 commit comments