xref: /PHP-7.0/ext/spl/tests/dit_004.phpt (revision 3a4eb3e4)
1--TEST--
2SPL: DirectoryIterator and clone
3--FILE--
4<?php
5$a = new DirectoryIterator(__DIR__);
6$b = clone $a;
7var_dump((string)$b == (string)$a);
8var_dump($a->key(), $b->key());
9$a->next();
10$a->next();
11$a->next();
12$c = clone $a;
13var_dump((string)$c == (string)$a);
14var_dump($a->key(), $c->key());
15?>
16===DONE===
17--EXPECTF--
18bool(true)
19int(0)
20int(0)
21bool(true)
22int(3)
23int(3)
24===DONE===
25