blob: d15acff87acd367950312720a2aea2c33d366a3a (
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 mark trait methods as constructor
--FILE--
<?php
trait Foo {
public function Foo() {
}
}
class Bar {
use Foo;
public function Bar() {
}
}
$rfoofoo = new ReflectionMethod('Foo::Foo');
var_dump($rfoofoo->isConstructor());
$rbarfoo = new ReflectionMethod('Bar::Foo');
var_dump($rbarfoo->isConstructor());
$rbarbar = new ReflectionMethod('Bar::Bar');
var_dump($rbarbar->isConstructor());
?>
--EXPECT--
bool(false)
bool(false)
bool(true)
|