1--TEST--
2Test ResourceBundle iterator
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7    include "resourcebundle.inc";
8
9    // fall back
10    $r = new ResourceBundle( 'en_US', BUNDLE );
11
12    foreach ($r as $onekey => $oneval) {
13        echo "Here comes $onekey:\n";
14        switch (gettype($oneval)) {
15          case 'string':
16            echo bin2hex( $oneval ) . "\n";
17            break;
18
19          case 'integer':
20            echo "$oneval\n";
21            break;
22
23          default:
24            print_r( $oneval );
25        }
26        echo "\n";
27    }
28
29    echo "Testarray Contents:\n";
30    $r = $r->get( 'testarray' );
31    foreach ($r as $onekey => $oneval) {
32       echo "$onekey => $oneval\n";
33    }
34?>
35--EXPECT--
36Here comes testarray:
37ResourceBundle Object
38(
39)
40
41Here comes testbin:
42a1b2c3d4e5f67890
43
44Here comes testint:
452
46
47Here comes teststring:
4848656c6c6f20576f726c6421
49
50Here comes testtable:
51ResourceBundle Object
52(
53)
54
55Here comes testvector:
56Array
57(
58    [0] => 1
59    [1] => 2
60    [2] => 3
61    [3] => 4
62    [4] => 5
63    [5] => 6
64    [6] => 7
65    [7] => 8
66    [8] => 9
67    [9] => 0
68)
69
70Testarray Contents:
710 => string 1
721 => string 2
732 => string 3
74