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
Refactor the parsing and processing of configuration options ... just a bit ...
[hiphop-php.git]
/
hphp
/
test
/
slow
/
nullsafe
/
nullsafe-call-8.php
blob
9da4ab5bfc3fce9901d137e0b390a2a216e8611e
1
<
?hh
2
class
D
{
3
public function
bar
() {
4
echo
"D::bar() was called
\n
"
;
5
}
6
}
7
class
C
{
8
public function
foo
() {
9
return new
D
();
10
}
11
}
12
function
test
(
$obj
) {
13
$d
=
$obj
?
->
foo
();
14
if
(
$d
!==
null
) {
15
$d
->
bar
();
16
}
17
}
18
function
main
() {
19
echo
"1:
\n
"
;
20
test
(
null
);
21
echo
"2:
\n
"
;
22
test
(
new
C
());
23
echo
"Done
\n
"
;
24
}
25
main
();