xref: /PHP-7.4/ext/spl/tests/dit_005.phpt (revision 46d5a9be)
1--TEST--
2SPL: FilesystemIterator and clone
3--FILE--
4<?php
5// Let's hope nobody writes into this directory while testing...
6$a = new FileSystemIterator(__DIR__ . '/..');
7$b = clone $a;
8var_dump((string)$b == (string)$a);
9var_dump($a->key() == $b->key());
10$a->next();
11$a->next();
12$a->next();
13$c = clone $a;
14var_dump((string)$c == (string)$a);
15var_dump($a->key() == $c->key());
16?>
17===DONE===
18--EXPECT--
19bool(true)
20bool(true)
21bool(true)
22bool(true)
23===DONE===
24