File: source.php

package info (click to toggle)
phploc 7.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 556 kB
  • sloc: php: 2,383; xml: 121; makefile: 22
file content (75 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (5)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace a\name\space;

/*
 * A comment.
 */

define('A_GLOBAL_CONSTANT', 'foo');

use function time;

function &a_global_function()
{
    $a = AClass::CLASS;
}

interface AnInterface
{
}

abstract class AnAbstractClass
{
}

/**
 * A comment.
 */
class AClass extends AnAbstractClass implements AnInterface
{
    const A_CLASS_CONSTANT = 'bar';

    private static $a = array();

    public static function aStaticMethod()
    {
        global $foo;

        $a = $_GET['a'];
        $GLOBALS['bar'] = A_GLOBAL_CONSTANT;
        // Another comment
        $o->m();
        $o->$m();
        $o->a;
        $o->$a;
    }

    public function aPublicMethod()
    {
        $a = true ? true : false;

        c::m();
        c::$m();
        c::$a;
        c::$a;
        c::aConstant;
    }

    protected function aProtectedMethod()
    {
        if (true) {
        }

        $c::m();
        $c::$m();
        $c::$a;
        $c::$a;
    }

    private function aPrivateMethod()
    {
        $function = function() {};
        echo "This is {$great}";
        echo "This is ${great}";
    }
}