Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 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
    if ($foo) {
56
    }
57
}