summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/no_static_arg_binding.phpt
blob: 3134cf621b409b10949d01ab17f8ce49fa3a77f7 (plain)
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
--TEST--
Don't statically bind arguments for self:: calls in traits
--FILE--
<?php

trait T {
    public static function method($arg) {
    }
    public static function call() {
        $i = 0;
        self::method($i);
        var_dump($i);
    }
}

class C {
    use T;

    public static function method(&$arg) {
        $arg++;
    }
}

C::call();

?>
--EXPECT--
int(1)