Subversion Repositories Applications.framework

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 aurelien 1
<?php
2
 
3
switch ($foo) {
4
    // Empty switch statement body
5
}
6
 
7
switch ($foo) {
8
    case 'bar':
9
        break;
10
    default:
11
        break;
12
}
13
 
14
 
15
if ($foo) {
16
    // Just a comment
17
} elseif ($bar) {
18
    // Yet another comment
19
} else {
20
 
21
}
22
 
23
if ($foo) {
24
    $foo = 'bar';
25
} else if ($bar) {
26
    $bar = 'foo';
27
}
28
 
29
for ($i = 0; $i < 10; $i++) {
30
    for ($j = 0; $j < 10; $j++) {
31
        // Just a comment
32
    }
33
}
34
 
35
foreach ($foo as $bar) {}
36
 
37
foreach ($foo as $bar) {
38
    $bar *= 2;
39
}
40
 
41
do {
42
    // Just a comment
43
    // Just another comment
44
} while ($foo);
45
 
46
do {
47
    while ($bar) {
48
 
49
    }
50
} while (true);
51
 
52
while ($foo) { /* Comment in the same line */ }
53
 
54
while ($foo) {
55
    try {
56
 
57
    } catch (Exception $e) {
58
        echo $e->getTraceAsString();
59
    }
60
}
61
 
62
try {
63
    throw Exception('Error...');
64
} catch (Exception $e) {}
65
 
66
try {
67
    throw Exception('Error...');
68
} catch (Exception $e) {
69
    // TODO: Handle this exception later :-)
70
}