xref: /PHP-7.2/Zend/tests/each_002.phpt (revision 06a03401)
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--
19Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
20bool(false)
21bool(false)
22array(4) {
23  [1]=>
24  object(stdClass)#1 (0) {
25  }
26  ["value"]=>
27  object(stdClass)#1 (0) {
28  }
29  [0]=>
30  int(0)
31  ["key"]=>
32  int(0)
33}
34