summaryrefslogtreecommitdiff
path: root/Zend/tests/nullsafe_operator/008.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/nullsafe_operator/008.phpt')
-rw-r--r--Zend/tests/nullsafe_operator/008.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/tests/nullsafe_operator/008.phpt b/Zend/tests/nullsafe_operator/008.phpt
new file mode 100644
index 0000000000..360d137b86
--- /dev/null
+++ b/Zend/tests/nullsafe_operator/008.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Test nullsafe property coalesce assignment
+--FILE--
+<?php
+
+$foo = null;
+var_dump($foo?->bar ??= 'bar');
+
+?>
+--EXPECTF--
+Fatal error: Can't use nullsafe operator in write context in %s.php on line 4