summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug30148.phpt
blob: aa5841ee5bebd7114327051b415385a58c9d4d38 (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
29
30
31
32
33
34
35
--TEST--
Reflection Bug #30148 (ReflectionMethod->isConstructor() fails for inherited classes)
--FILE--
<?php

class Root
{
	function Root() {}
}
class Base extends Root
{
	function __construct() {}
}
class Derived extends Base
{
}
$a = new ReflectionMethod('Root','Root');
$b = new ReflectionMethod('Base','Root');
$c = new ReflectionMethod('Base','__construct');
$d = new ReflectionMethod('Derived','Root');
$e = new ReflectionMethod('Derived','__construct');
var_dump($a->isConstructor());
var_dump($b->isConstructor());
var_dump($c->isConstructor());
var_dump($d->isConstructor());
var_dump($e->isConstructor());
?>
===DONE===
--EXPECT--
bool(true)
bool(false)
bool(true)
bool(false)
bool(true)
===DONE===