mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
22 lines
455 B
PHP
22 lines
455 B
PHP
--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
|