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
/
ctor_param_promotion.php
blob
627a86563ffe6aac2e34d1809caeb6d0fbe54034
1
<
?hh
2
3
//
4
// this works
5
//
6
class
A
{
7
public
$c
;
8
public function
__construct
(
protected
$a
,
public
$b
,
$arg
) {
9
$this
->
c
=
$arg
;
10
}
11
12
public function
getA
() {
13
return
$this
->
a
;
14
}
15
}
16
17
$a
=
new
A
(
'hi'
,
3
,
array
());
18
foreach
(
$a
as
$k
=>
$v
) {
19
var_dump
(
$k
,
$v
);
20
}
21
var_dump
(
$a
->
getA
());
22