summaryrefslogtreecommitdiff
path: root/tests/classes/iterators_005.phpt
blob: 9c330ce89b23916be03ebb00677a9fa6372fa851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
ZE2 iterators cannot implement Traversable alone
--FILE--
<?php

class test implements Traversable {
}

$obj = new test;

foreach($obj as $v);

print "Done\n";
/* the error doesn't show the filename but 'Unknown' */
?>
--EXPECTF--
Fatal error: Class test must implement interface Traversable as part of either Iterator or IteratorAggregate in %s on line %d