Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class Test
4
{
5
    public function __construct()
6
    {
7
    }
8
 
9
    function test1()
10
    {
11
     }
12
 
13
    function test2() {}
14
 
15
    private function _test3()
16
    {
17
    }
18
 
19
}
20
 
21
 
22
class Test2
23
{
24
 }
25
 
26
 
27
public function test2()
28
{
29
    if ($str{0}) {
30
        $chr = $str{0};
31
    }
32
 
33
    if (!class_exists($class_name)) {
34
        echo $error;
35
    }
36
    $this->{$property} =& new $class_name($this->db_index);
37
    $this->modules[$module] =& $this->{$property};
38
}
39
 
40
foreach ($elements as $element) {
41
    if ($something) {
42
        // Do IF.
43
    } else if ($somethingElse) {
44
        // Do ELSE.
45
    }
46
}
47
 
48
switch ($foo) {
49
case 1:
50
    switch ($bar) {
51
    default:
52
        if ($something) {
53
            echo $string{1};
54
        } else if ($else) {
55
            switch ($else) {
56
            case 1:
57
                // Do something.
58
                break;
59
            default:
60
                // Do something.
61
            break;
62
            }
63
        }
64
    }
65
break;
66
case 2:
67
    // Do something;
68
    break;
69
}
70
 
71
switch ($httpResponseCode) {
72
    case 100:
73
        return 'Continue.';
74
    case 101:
75
        return 'Switching protocols.';
76
    case 102:
77
        return 'Processing.';
78
    default:
79
        return 'Unknown';
80
}
81
 
82
switch ($httpResponseCode) {
83
    case 100:
84
        return 'Continue.';
85
    case 101:
86
        return 'Switching protocols.';
87
    case 102:
88
        return 'Processing.';
89
    default:
90
        return 'Unknown';
91
    break;
92
}
93
?>