503f75d08b
These names don't make sense now that we run both suites the same way.
34 linhas
345 B
PHP
34 linhas
345 B
PHP
<?php
|
|
|
|
trait T {
|
|
function f() {
|
|
return function ($a) {
|
|
if ($a) {
|
|
return $this->foo;
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
class X {
|
|
private $foo = 1;
|
|
use T;
|
|
}
|
|
|
|
class Y {
|
|
private $foo = 2;
|
|
use T;
|
|
}
|
|
|
|
function test() {
|
|
$x = new X;
|
|
$c = $x->f();
|
|
var_dump($c(true));
|
|
|
|
$y = new Y;
|
|
$c = $y->f();
|
|
var_dump($c("foo"));
|
|
}
|
|
|
|
test();
|