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

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

function &returns_ref2() {
    $null = null;
    return returns_ref($null?->null);
}

global $foo;

$foo2 = &returns_ref2();
$foo2 = 'foo';
var_dump($foo);

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