File: source.php

package info (click to toggle)
phploc 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 260 kB
  • ctags: 186
  • sloc: php: 1,357; xml: 152; makefile: 23
file content (70 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download
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
<?php
namespace a\name\space;

/**
 * A comment.
 */

define('A_GLOBAL_CONSTANT', 'foo');

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

interface AnInterface
{
}

abstract class AnAbstractClass
{
}

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;

        $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}";
    }
}