summaryrefslogtreecommitdiff
path: root/Zend/tests/nullsafe_operator/027.phpt
blob: 9e08a562c2d711753f0917ba3902a48a82b473ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Test nullsafe in sub-chain of function argument
--FILE--
<?php

function takes_ref(&$foo) {
    $foo = 'foo';
}

function &returns_ref($ref) {
    global $foo;
    return $foo;
}

global $foo;

$null = null;
takes_ref(returns_ref($null?->null()));
var_dump($foo);

?>
--EXPECT--
string(3) "foo"