diff options
Diffstat (limited to 'Zend/tests/nullsafe_operator/027.phpt')
-rw-r--r-- | Zend/tests/nullsafe_operator/027.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/nullsafe_operator/027.phpt b/Zend/tests/nullsafe_operator/027.phpt new file mode 100644 index 0000000000..9e08a562c2 --- /dev/null +++ b/Zend/tests/nullsafe_operator/027.phpt @@ -0,0 +1,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" |