xref: /PHP-8.3/ext/spl/tests/dit_005.phpt (revision a555cc0b)
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--EXPECT--
18bool(true)
19bool(true)
20bool(true)
21bool(true)
22