facebook / facebook/hhvm

ReflectionFunction::getClosureThis() return ReflectionMethod

Open
#5,564 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.