ReflectionFunction::getClosureThis() return ReflectionMethod
Open
php5 incompatibility
probably easy
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
In this code:
``` php
class Test
{
function method() {}
}
$obj = new Test;
$closure = (new \ReflectionMethod('Test', 'method'))->getClosure($obj);
$ref = new \ReflectionFunction($closure);
$obj2 = $ref->getClosureThis();
```
in PHP `$obj === $obj2`
in HHVM `$obj2` is instance of ReflectionMethod
demo http://3v4l.org/OjCTd
Contributor guide
Assessment
This issue has not been assessed yet.