source: src/router/php7/Zend/tests/traits/no_static_arg_binding.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 374 bytes
Line 
1--TEST--
2Don't statically bind arguments for self:: calls in traits
3--FILE--
4<?php
5
6trait T {
7    public static function method($arg) {
8    }
9    public static function call() {
10        $i = 0;
11        self::method($i);
12        var_dump($i);
13    }
14}
15
16class C {
17    use T;
18
19    public static function method(&$arg) {
20        $arg++;
21    }
22}
23
24C::call();
25
26?>
27--EXPECT--
28int(1)
Note: See TracBrowser for help on using the repository browser.