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
/
vgets.php
blob
e1c96aca2074916effb695c07e3a6e3588ecb0f3
1
<
?hh
2
// Copyright 2004-2015 Facebook. All Rights Reserved.
3
4
print
"Test begin
\n
"
;
5
6
class
A
{
7
static public
$a
=
1
;
8
static public function
setA
(
$val
) {
9
self
::
$a
=&
$val
;
10
}
11
}
12
13
function
main
(){
14
echo
"main
\n
"
;
15
A
::
$a
=
30
;
16
$x
=&
A
::
$a
;
17
print
(
$x
.
A
::
$a
.
"
\n
"
);
18
$x
=
5
;
19
print
(
$x
.
A
::
$a
.
"
\n
"
);
20
}
21
22
function
main2
(
$name
){
23
echo
"main2
\n
"
;
24
$name
::
$a
=
30
;
25
$x
=&
$name
::
$a
;
26
print
(
$x
.
$name
::
$a
.
"
\n
"
);
27
$x
=
5
;
28
print
(
$x
.
$name
::
$a
.
"
\n
"
);
29
}
30
31
function
main3
() {
32
A
::
setA
(
5
);
33
}
34
35
main
();
36
main
();
37
38
main2
(
"A"
);
39
main2
(
"A"
);
40
41
main3
();
42
main3
();