File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
lang /
022.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 8 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Switch test 3
3: --FILE--
4: <?php
5:
6: function switchtest ($i, $j)
7: {
8: switch ($i) {
9: case 0:
10: switch($j) {
11: case 0:
12: echo "zero";
13: break;
14: case 1:
15: echo "one";
16: break;
17: default:
18: echo $j;
19: break;
20: }
21: echo "\n";
22: break;
23: default:
24: echo "Default taken\n";
25: }
26: }
27: for ($i=0; $i<3; $i++) {
28: for ($k=0; $k<10; $k++) {
29: switchtest (0,$k);
30: }
31: }
32: ?>
33: --EXPECT--
34: zero
35: one
36: 2
37: 3
38: 4
39: 5
40: 6
41: 7
42: 8
43: 9
44: zero
45: one
46: 2
47: 3
48: 4
49: 5
50: 6
51: 7
52: 8
53: 9
54: zero
55: one
56: 2
57: 3
58: 4
59: 5
60: 6
61: 7
62: 8
63: 9
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>