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