xref: /PHP-5.3/tests/lang/022.phpt (revision d94136fc)
1--TEST--
2Switch test 3
3--FILE--
4<?php
5
6function 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}
27for ($i=0; $i<3; $i++) {
28  for ($k=0; $k<10; $k++) {
29    switchtest (0,$k);
30  }
31}
32?>
33--EXPECT--
34zero
35one
362
373
384
395
406
417
428
439
44zero
45one
462
473
484
495
506
517
528
539
54zero
55one
562
573
584
595
606
617
628
639
64