repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Handle this typehints
[hiphop-php.git]
/
hphp
/
test
/
quick
/
closure_noscope_arg_use_ctx.php
blob
ee1a59236d48831b228beab5acd693e1bbec616f
1
<
?hh
2
3
class
foo
{
4
private
$test
=
3
;
5
6
public function
x
(
$fn
) {
7
$a
= &
$this
;
8
$this
->
a
=
$fn
;
9
var_dump
(
$this
->
a
->
__invoke
());
10
var_dump
(
is_a
(
$this
->
a
,
'closure'
));
11
var_dump
(
is_callable
(
$this
->
a
));
12
13
return
$this
->
a
;
14
}
15
}
16
17
$foo
=
new
foo
;
18
$y
=
$foo
->
x
(
function
()
use
(&
$foo
) {
return
$foo
; });
19
var_dump
(
$y
()->
test
);