xref: /PHP-7.1/Zend/tests/each_002.phpt (revision 15d1d4f4)
1--TEST--
2Testing each() with array and object
3--FILE--
4<?php
5
6$a = new stdClass;
7$foo = each($a);
8var_dump($foo);
9
10$a = new stdClass;
11var_dump(each($a));
12
13$a = array(new stdClass);
14var_dump(each($a));
15
16
17?>
18--EXPECTF--
19bool(false)
20bool(false)
21array(4) {
22  [1]=>
23  object(stdClass)#1 (0) {
24  }
25  ["value"]=>
26  object(stdClass)#1 (0) {
27  }
28  [0]=>
29  int(0)
30  ["key"]=>
31  int(0)
32}
33