1--TEST--
2SPL: ArrayObject::__construct with too many arguments.
3--FILE--
4<?php
5echo "Too many arguments:\n";
6Class C implements Iterator {
7    function current(): mixed {}
8    function next(): void {}
9    function key(): mixed {}
10    function valid(): bool {}
11    function rewind(): void {}
12}
13
14try {
15  var_dump(new ArrayObject(new stdClass, 0, "C", "extra"));
16} catch (TypeError $e) {
17  echo $e->getMessage() . "(" . $e->getLine() .  ")\n";
18}
19?>
20--EXPECT--
21Too many arguments:
22ArrayObject::__construct() expects at most 3 arguments, 4 given(12)
23