php-src/Zend/tests/traits/no_static_arg_binding.phpt
2016-04-08 01:48:21 +02:00

28 lines
374 B
PHP

--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)