1--TEST--
2SPL: FilesystemIterator::getFlags() basic tests
3--CREDITS--
4Joshua Thijssen <jthijssen@noxlogic.nl>
5--FILE--
6<?php
7
8$it = new FileSystemIterator(".");
9printflags($it);
10
11$it->setFlags(FileSystemIterator::CURRENT_AS_SELF |
12        FileSystemIterator::KEY_AS_FILENAME |
13        FileSystemIterator::SKIP_DOTS |
14        FileSystemIterator::UNIX_PATHS);
15printflags($it);
16
17$it->setFlags(-1);
18printflags($it);
19
20function printflags($it) {
21    printf("%08X\n", $it->getFlags());
22    printf("%08X\n", ($it->getFlags() & FileSystemIterator::CURRENT_MODE_MASK));
23    printf("%08X\n", ($it->getFlags() & FileSystemIterator::KEY_MODE_MASK));
24    printf("%08X\n", ($it->getFlags() & FileSystemIterator::OTHER_MODE_MASK));
25}
26
27?>
28--EXPECT--
2900001000
3000000000
3100000000
3200001000
3300003110
3400000010
3500000100
3600003000
3700007FF0
38000000F0
3900000F00
4000007000
41