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