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
/
array-ref.php
blob
554698ff999448346f367fecb592fcd58fce7419
1
<
?hh
2
3
function
yes
() {
return true
; }
4
5
function
main
() {
6
$a
=
array
();
7
$a
[
'wat'
] =&
$a
;
8
$b
=
$a
;
// Make sure the next line triggers COW
9
if
(
yes
()) {
10
// Force a new tracelet
11
$a
[
'wat'
] =
5
;
12
}
13
var_dump
(
$a
);
14
}
15
main
();
16
17
function
main2
(&
$a
) {
18
$a
=
array
();
19
$a
[
'foo'
] =
'flee'
;
20
}
21
main2
(&
$z
);
22
var_dump
(
$z
);