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
global statement removal: hphp/test [7/x]
[hiphop-php.git]
/
hphp
/
test
/
quick
/
prop_ctx.php
blob
8541e5e2234a28396b1eb1c49f6a7f6d25c6fcc2
1
<
?hh
2
3
trait t
{
4
public static function
f
(
$o
) {
5
var_dump
(
$o
->
prop
);
6
}
7
public static function
set
(
$o
,
$v
) {
8
$o
->
prop
=
$v
;
9
var_dump
(
$o
);
10
}
11
}
12
13
class
a
{
14
use
t
;
15
private
$prop
=
'I am private in a'
;
16
}
17
18
class
b
extends
a
{
19
public
$prop
=
'I am public in b'
;
20
}
21
22
function
main
() {
23
$b
=
new
b
();
24
$b
->
f
(
$b
);
25
t
::
f
(
$b
);
26
27
$b
->
set
(
$b
,
'new value'
);
28
t
::
set
(
$b
,
'newer value'
);
29
30
$a
=
new
a
();
31
$a
->
f
(
$a
);
32
t
::
f
(
$a
);
33
}
34
main
();