mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
25 lines
467 B
PHP
25 lines
467 B
PHP
--TEST--
|
|
SPL: Iterator::__construct(void)
|
|
--CREDITS--
|
|
Sebastian Schürmann
|
|
--FILE--
|
|
<?php
|
|
class myIterator implements Iterator {
|
|
|
|
function current(): mixed {}
|
|
function next(): void {}
|
|
function key(): mixed {}
|
|
function valid(): bool {}
|
|
function rewind(): void {}
|
|
|
|
}
|
|
try {
|
|
$it = new myIterator();
|
|
} catch (InvalidArgumentException $e) {
|
|
echo 'InvalidArgumentException thrown';
|
|
}
|
|
echo 'no Exception thrown';
|
|
?>
|
|
--EXPECT--
|
|
no Exception thrown
|