summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_057.phpt
blob: e88e6a92b0ea1e67aaaf1f8ceb204e636ab70314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
SPL: ArrayIterator::__construct(void)
--CREDITS--
Sebastian Schürmann
--FILE--
<?php
/**
 * From Docs: Construct a new array iterator from anything that has a hash table.
 * NULL, NOTHING is not a hash table ;)
 */
class myArrayIterator extends ArrayIterator {
}
try {
    $it = new myArrayIterator();
} catch (InvalidArgumentException $e) {
    echo 'InvalidArgumentException thrown';
}
echo 'no Exception thrown'
?>
--EXPECT--
no Exception thrown