summaryrefslogtreecommitdiffstats
path: root/debian/perl-framework/t/htdocs/php/switch4.php
blob: 24fb51f233575ad06061ef2e98fe0254a41a3f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

function switchtest ($i, $j)
{
        switch ($i):
                case 0:
                                switch($j) {
                                        case 0:
                                                echo "zero";
                                                break;
                                        case 1:
                                                echo "one";
                                                break;
                                        default:
                                                echo $j;
                                                break;
                                }
                                echo "\n";
                                break;
                default:
                                echo "Default taken\n";
        endswitch;
}
for ($i=0; $i<3; $i++) {
  for ($k=0; $k<10; $k++) {
    switchtest (0,$k);
  }
}
?>