summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug67068.phpt
blob: 35c1b1674f4fd4800cdeb6bc14becbdf30a7c445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #67068 (ReflectionFunction::getClosure returns something that doesn't report as a closure)
--FILE--
<?php
class MyClass {
    public function method() {}
}

$object = new MyClass;
$reflector = new \ReflectionMethod($object, 'method');
$closure = $reflector->getClosure($object);

$closureReflector = new \ReflectionFunction($closure);

var_dump($closureReflector->isClosure());
?>
--EXPECT--
bool(true)