summaryrefslogtreecommitdiff
path: root/ext/spl/tests/arrayObject___construct_error2.phpt
blob: 35ba83d09f3b0d2687c81d44542231d7b21b88ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
SPL: ArrayObject::__construct with too many arguments.
--FILE--
<?php
echo "Too many arguments:\n";
Class C implements Iterator {
	function current() {}
	function next() {}
	function key() {}
	function valid() {}
	function rewind() {}
}

try {
  var_dump(new ArrayObject(new stdClass, 0, "C", "extra"));
} catch (TypeError $e) {
  echo $e->getMessage() . "(" . $e->getLine() .  ")\n";
}
?>
--EXPECTF--
Too many arguments:
ArrayObject::__construct() expects at most 3 parameters, 4 given(12)